Re: dynamically addnig controls and viewstate

Marc Brooks <[email protected]> Fri, 20 Jul 2007 19:09:06 -0500
Newsgroups gmane.comp.windows.devel.dotnet.web
Message-ID <[email protected]>
You have to have all your controls in place by the end of the OnInit
in order for the event handling to work.  The easiest thing to do is
ALWAYS put the control on and then only enable it as appropriate.

Marc

On 7/20/07, Smotritsky, Alex <[email protected]> wrote:
> I'm adding some controls to a webform in a click event handler. Since I
> do this on click I don't think I can do it in page load or init. I'm
> finding that these dynamically added controls are not saved in
> ViewState. Are there any work arounds for this? I'm thinking of putting
> them in session state.
>
>
>
>
>
>
> ===================================
> This list is hosted by DevelopMentor(r)  http://www.develop.com
>
> View archives and manage your subscription(s) at http://discuss.develop.com
>


--
"It's not the quality of journalism that is sinking e-media companies, it
the quality."  Thom Calandra - CBS Marketwatch

Marc C. Brooks
http://musingmarc.blogspot.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com