The solution in my work now is to override LoadViewState and SaveViewState
methods.
In SaveViewState, I pack everything in the ViewState statebag then call
base.SaveViewState() to pass everything to _viewstate.
In LoadViewState, I pop everything after calling base.LoadViewState() to
restore the settings.
The above runs so far so good.
"TJS" <no****@here.com> ¦b¶l¥ó news:eX**************@TK2MSFTNGP12.phx.gbl ¤¤
¼¶¼g...
I too have searched for materials, books and tutorials on user controls
and found they are limited in availability or limited help.
I handle viewstate in my aspx files as user controls can be shared
"Lau Lei Cheong" <la****@yahoo.com.hk> wrote in message
news:uO**************@TK2MSFTNGP12.phx.gbl... Hello,
I'm writing UserControls as stated earlier. Now I come to the
problem that I need to preserve viewstate in my controls.
If I want to save the informations on the controls, in which event I
have to do so(on main form or on usercontrol)? Or could there be
simplier method such as writing a custom enableviewstate handler?
I've searched in google for tutorials on writing UserControls but
much of them do not cover these topics. Is there any more detailed tutorials
someone can suggest to me, so I need not keep asking questions here that
maybe too fundimential?
Thanks a lot.
Regards,
Lau Lei Cheong