Adding a persistable TextBox property

Jason Barnett

Usenet Archive
Joined
Apr 19, 2004
Messages
23
Reaction score
0
I've developed a control that inherits from TextBox. I created a property that gets rendered into a HiddenField, which is altered by javascript at run time. The HiddenField is initialized during OnInt, and added to the controls collection during CreateChildControls. Also, I've overridden the LoadPostData method to retrieve the property value based on the HiddenField's ID.

All works well, but I'm concerned about the last step (retrieving the value during LoadPostData). I'm curious if there is a way to get ASP.NET will restore the ViewState of the child control for me. Is anyone aware of a better way to handle this?
 

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
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top