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.