Hi Nadav,
Thanks for posting in this group.
Based on my understanding, you are building a custom control which has many
"customized" member variables associated it. But when postback, you find
these member variables' did not keep it original value(The value that being
set in first load time)
Actually, in asp.net web form mechanism, a control's life time is very
short on server side. Because of Http protocol's stateless, asp.net persist
the control's state through ViewState. Asp.net will persist the pre-defined
fields of control in ViewState, while for the persistence of customized
variables, you should persist them in viewstate yourself.
For more information about state management, please refer to the articles
below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconmantainingstateincontrol.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/
vbconchoosingserverstateoption.asp
Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.