There is one way around this ugly mess here
http://aspnet.4guysfromrolla.com/articles/092904-1.aspx

Basically you must create the controlin Page_Init to make sure 
viewstate save picks it up.  and then create again OnInit and remove 
oin Page_load if not needed.  Sounds like a dog chasing his tail.

Thanks

  
--- In [email protected], "Peter Brunone" 
<[EMAIL PROTECTED]> wrote:
> 
>       That's because any dynamic controls are not added to Viewstate.
> 
>       You can try manually adding them to the Page.Viewstate
> collection, but then of course you'll have to manually pull them out 
on
> postback and put them in the page again (at least as I understand 
it).
> 
> -----Original Message-----
> From: [email protected] On Behalf Of Zed Burton
> 
> I create a control dynamically in the code behind, but when it posts 
> back, its not in viewstate, what gives?




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to