![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have created a WebControl that inherits from TextBox. I would like to add a property to it that stores/retrieves a ViewState value, so the value is persisted upon postback. As an attempt to accomplisth this, I've added a HiddenField control to the Controls collection during CreateChildControls. At the client, I have JavaScript that updates the hidden value. On postback, I retrieve the value during LoadPostData, like so Text = postCollection[this.UniqueID + "_HiddenFld"]; Thought there might be a better way to accomplish this though. I'm worried that the value may not always be persisted for some reason. Is there a better way of doing this? |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |