what is,& what is not saved in viewstate automatically?

X

xamman

hi there,
from what i understand not all objects & variables are saved in the
viewstate, even though all objects & vars are lost after the page
response is sent to the client browser.

is there any rule to determine what is automatically kept by .NET in
the viewstate (i.e. only objects inheriting from a specific class or
control?) between postbacks

thanks,
x
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

xamman said:
hi there,
from what i understand not all objects & variables are saved in the
viewstate, even though all objects & vars are lost after the page
response is sent to the client browser.

is there any rule to determine what is automatically kept by .NET in
the viewstate (i.e. only objects inheriting from a specific class or
control?) between postbacks

thanks,
x

Nothing is saved in the viewstate automatically. Everything in the
viewstate is put there by the controls themselves.

A TextBox control, for example, will put the original value of the Text
property in the viewstate, so that it can compare that to the new value
that comes in the postback.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top