Retaining WebControl Properties

A

Angel

I have built a web control that inherits from webcontrol class. When using the control I created in a project, I set certain properties such as the Font, font size that were inherit in the webcontrol class. When I perform a postback to the server those properties that I set with values are not retained, eventhough I set EnableViewState = true.

Do I need to save all the inherited properties from webcontrol and my own custom properties to ViewState in the WebControl?

Thanks...
 
J

John Saunders

Angel said:
I have built a web control that inherits from webcontrol class. When using
the control I created in a project, I set certain properties such as the
Font, font size that were inherit in the webcontrol class. When I perform a
postback to the server those properties that I set with values are not
retained, eventhough I set EnableViewState = true.
Do I need to save all the inherited properties from webcontrol and my own
custom properties to ViewState in the WebControl?

In which event did you set the properties?
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top