I am somewhat new to ASP.NET and very new to custom controls, so I apologize in advance if my question is ridiculous or hard to understand.
I have a custom control that:
[ul]
[li]Inherits WebControl[/li]
[li]Overrides the Enabled property[/li]
[li]Implements System.Web.UI.ICallbackEventHandler[/li]
[/ul]
All elements of the control work properly except for when the Enabled property is modified during a callback. After the property has been modified during a callback, its value is not persisted through the next postback. I have tinkered around with the SaveControlState, LoadControlState, HiddenFields, SaveAllState, EnableViewState, Session variables, and much more. The only way I have possibly been able to get it to work is with a session variable, which I would like to avoid as I've heard that they are a poor route to take. Is there anything else that I can try or am I doing something silly?
Thank you to anyone who helps!
I have a custom control that:
[ul]
[li]Inherits WebControl[/li]
[li]Overrides the Enabled property[/li]
[li]Implements System.Web.UI.ICallbackEventHandler[/li]
[/ul]
All elements of the control work properly except for when the Enabled property is modified during a callback. After the property has been modified during a callback, its value is not persisted through the next postback. I have tinkered around with the SaveControlState, LoadControlState, HiddenFields, SaveAllState, EnableViewState, Session variables, and much more. The only way I have possibly been able to get it to work is with a session variable, which I would like to avoid as I've heard that they are a poor route to take. Is there anything else that I can try or am I doing something silly?
Thank you to anyone who helps!