Custom Web Control - persistance issue

bri189a

Senior Contributor
Joined
Sep 11, 2003
Messages
1,004
Location
VA
I don't do this often enough to remember and solution that worked before doesn't work in this instance.

I'm making a control that derives from Component (it's something that will NOT be rendered) instead of WebControl (so it doesn't show up on designer - only components section).

Anyway, one of it's property's uses the CollectionEditor for the EditorAttribute. Problem is that anytime I 'build' the project anything that is in that collection is lost.

In a previous project since it was a rendered control I just used DesignerSerializationVisibility and PersistanceMode attributes to get it to save in the code of the server tags - well since this is a 'component' there are no server tags.

I've tried every combination of PersistChildren/ParseChildren trying to 'luck' into the right combination - so now I reached the point of having to admit I don't know and hoping for some help. I know somehow VS will put the code into the code behind but I can't figure out how for the life of me.

Thanks.
 
Back
Top