Session("counter") vs. ViewState("counter")...a newbie question

  • Thread starter Thread starter The Eeediot
  • Start date Start date
T

The Eeediot

Okay, I'm going to take one more kick at this dead horse to see if I understand this stuff.

· Session("counter") store this information on the web server (i.e. server side) and can be accessed by any pages within the web application.

· ViewState("counter") stores this information on the page (i.e. client side) and is only accessible within that individual page.

Am I missing anything?

===========
I have a mind like a steel trap...the trouble is getting it open!
 
Everything you said is true.

Also, there are other considerations. Store too many things in your ViewState, and your pages become bloated and slow. Store too many in session state, and with many users you get low on memory.

Restart your web app or reboot your machine, and you lose your session state info, unless you are using sql server.
Okay, I'm going to take one more kick at this dead horse to see if I understand this stuff.

· Session("counter") store this information on the web server (i.e. server side) and can be accessed by any pages within the web application.

· ViewState("counter") stores this information on the page (i.e. client side) and is only accessible within that individual page.

Am I missing anything?

===========
I have a mind like a steel trap...the trouble is getting it open!
 
You seem to have the basic idea down.

Okay, I'm going to take one more kick at this dead horse to see if I
understand this stuff.

· Session("counter") store this information on the web server (i.e. server
side) and can be accessed by any pages within the web application.

· ViewState("counter") stores this information on the page (i.e. client
side) and is only accessible within that individual page.

Am I missing anything?

===========
I have a mind like a steel trap...the trouble is getting it open!
 
Back
Top