J
Jiho Han
I created a web server control which contains a collection which in turn
contains another control.
It's similar to the ImageMap control in Chapter 10 of the server control
book by Nikhil Kothari.
So things are working ok, I can drop the control onto the designer and it
creates the parent tags. I can either use the collection editor, the OOB
collection editor or add child controls via HTML and the designer will
either generate the HTML or parse the HTML correctly.
The only problem is that when I create a default child control in the server
control's constructor or in the get accessor of the collection property.
The default child can be seen and edited in the collection editor and I can
add to the list or remove at will.
It just doesn't write out the default child control - as inner property
btw - when you first drag&drop the server control. Once I modify the
collection via the collection editor, then the markups for the all child
controls are generated.
I am guessing that the collection editor is serializing the collection anew
whenever it's dirty. It must be doing that via some method call. I guess
I'd have to do the same within my server control so that I can notify the
control to write out the default child when dropped on to the designer. I
just don't know how!
Please help.
Thanks
contains another control.
It's similar to the ImageMap control in Chapter 10 of the server control
book by Nikhil Kothari.
So things are working ok, I can drop the control onto the designer and it
creates the parent tags. I can either use the collection editor, the OOB
collection editor or add child controls via HTML and the designer will
either generate the HTML or parse the HTML correctly.
The only problem is that when I create a default child control in the server
control's constructor or in the get accessor of the collection property.
The default child can be seen and edited in the collection editor and I can
add to the list or remove at will.
It just doesn't write out the default child control - as inner property
btw - when you first drag&drop the server control. Once I modify the
collection via the collection editor, then the markups for the all child
controls are generated.
I am guessing that the collection editor is serializing the collection anew
whenever it's dirty. It must be doing that via some method call. I guess
I'd have to do the same within my server control so that I can notify the
control to write out the default child when dropped on to the designer. I
just don't know how!
Please help.
Thanks