Specifying dynamic default values for properties in custom controls:

P

Praveen Ramesh

Hey guys,

I have a custom int property in my control whose default value is dynamic,
so I cannot specify a "DefaultValue" attribute. However, I provide the
corresponding ShouldSerializeXXX method. But, this method doesn't seem to be
consulted when serialization occurs - the above property seems to be written
into the tag as attribute even if the value is just the default value!

Seems like the asp.net designer doesn't look for the ShouldSerializeXXX
paradigm? If so, how else would one handle dynamic-default values?

Thanks
Praveen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top