[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webcontrols

Please help : loosing viewstate of dynamically generated Table

Abhijeet Dev

1/23/2003 12:06:00 PM

Hi
Is there any way to store the viewstate of a dynamically generated
table.Table is generated by clicking a button (using postback method), and
when any other postback event occurs, it disappears from the view. please
help

Abhijeet Dev


4 Answers

jn

1/23/2003 8:35:00 PM

0

Be sure you give all your objects "ID" Properties a value.
This should do it. You may also want to build your table
in page_init not page_load.

>-----Original Message-----
>Hi
>Is there any way to store the viewstate of a dynamically
generated
>table.Table is generated by clicking a button (using
postback method), and
>when any other postback event occurs, it disappears from
the view. please
>help
>
>Abhijeet Dev
>
>
>.
>

lxp

1/24/2003 3:45:00 AM

0

after u generated table,u must rebind it
"Abhijeet Dev" <abhijeet_dev@hotmail.com> дÈëÏûÏ¢ÐÂÎÅ
:e0faD$swCHA.2472@TK2MSFTNGP12...
> Hi
> Is there any way to store the viewstate of a dynamically generated
> table.Table is generated by clicking a button (using postback method), and
> when any other postback event occurs, it disappears from the view. please
> help
>
> Abhijeet Dev
>
>


Paul Wilson [MVP]

1/24/2003 5:08:00 AM

0

First, you need to re-create all dynamic controls on each postback.
The only way around this is to use a control built by Denis Bauer
(see http://www.Deni... for the free control with source).

Next, the viewstate is already being saved if you re-create it again,
assuming you are re-creating it in the same spot in control hierarchy
(this is how viewstate is tracked -- by the position, not by the id).

Finally, if you have problems with posted values or server events
then you may need to recreate it all in OnInit or LoadViewState
(this is due to the page lifecycle and is dependent on your situation).

Thanks, Paul Wilson



Abhijeet Dev

1/24/2003 7:12:00 AM

0

Thanx a lot .. i'll try all of it..

Abhijeet Dev
"Paul Wilson [MVP]" <Paul@WilsonDotNet.com> wrote in message
news:uYRde41wCHA.2396@TK2MSFTNGP10...
> First, you need to re-create all dynamic controls on each postback.
> The only way around this is to use a control built by Denis Bauer
> (see http://www.Deni... for the free control with source).
>
> Next, the viewstate is already being saved if you re-create it again,
> assuming you are re-creating it in the same spot in control hierarchy
> (this is how viewstate is tracked -- by the position, not by the id).
>
> Finally, if you have problems with posted values or server events
> then you may need to recreate it all in OnInit or LoadViewState
> (this is due to the page lifecycle and is dependent on your situation).
>
> Thanks, Paul Wilson
>
>
>