RE: Adding Controls to a Page 2005-02-22 - By Tim Curtin
you have to create the controls on every trip in Page_Init and use ViewState to manage the data
>From: "Boudreau, Duane" <BoudreauD@(protected)> >Reply-To: aspnet-controlbuilding@(protected) >To: aspnet-controlbuilding@(protected) >Subject: [aspnet-controlbuilding] RE: Adding Controls to a Page >Date: Tue, 22 Feb 2005 16:24:39 -0500 > > >I added the code to create the controls dynamically to the Page_Load() >method post back, and in the OnInit() method, but in both cases the data >is not being preserved. > >What am I doing wrong? > >Duane > >-----Original Message----- >From: Joe Bradvica [mailto:JoeB@(protected)] >Sent: Tuesday, February 22, 2005 3:10 PM >To: aspnet-controlbuilding@(protected) >Subject: [aspnet-controlbuilding] RE: Adding Controls to a Page > >You have to re-add the controls on postback. The data is then >repopulated to the controls and you can access the data. > >Joe B. > > > > >Need SQL Advice? http://sqladvice.com >Need RegEx Advice? http://regexadvice.com >Need XML Advice? http://xmladvice.com
Need SQL Advice? http://sqladvice.com Need RegEx Advice? http://regexadvice.com Need XML Advice? http://xmladvice.com
|
|