Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / December 2004

Tip: Looking for answers? Try searching our database.

Losing inner HTML in web custom control after editing in design vi

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Christopher Strolia-Davis - 07 Dec 2004 16:45 GMT
Hello,

hopefully I will get some answers to this in this forum.

Here is the situation.  I have a web custom control.  when I am in HTML view,
I can add content to the inside of it.  I have set
ParseChildrenAttribute(False) so that
inside content is not treated as properties of the control.  If I change to
Design view and change a property in the control using the property browser,
and then change back to HTML View, all the content inside the control tags
disappears.

e.g.
If I have this in HTML View:

<mc:MyControl title="My Title">
 <table>
   <tr>
      <td>My Inside comment</td>
   </tr>
 </table>
</mc:MyControl>

Then I go to design view and change title in the property browser to "A New
Title", when I return to HTML view, my code looks like this:

<mc:MyControl title="A New Title"></mc:MyControl>

The persistChildren attribute , or creating a property with the
persistenceMode.InnerDefaultProperty don't seem to help.  Perhaps I'm using
them incorrectly.

Any help is appreciated.
Christopher Strolia-Davis - 07 Dec 2004 19:41 GMT
I don't know if this is the best answer, but it worked.  

I found that if I simply inherit from the system.web.ui.webcontrols.panel
control, which has much of the core functionality I was already looking for,
I was able to get past this issue. (How the panel control handles this issue,
I have no idea).

Just thought I'd let everyone know.

>  Hello,
>
[quoted text clipped - 7 lines]
> and then change back to HTML View, all the content inside the control tags
> disappears.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.