Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Session("counter") vs. ViewState("counter")...a newbie question

Reply
Thread Tools

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

 
 
The Eeediot
Guest
Posts: n/a
 
      12-22-2004
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!
 
Reply With Quote
 
 
 
 
Marina
Guest
Posts: n/a
 
      12-22-2004
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.
"The Eeediot" <> wrote in message news:ru-dnSI9xYXkf1TcRVn-...
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!
 
Reply With Quote
 
 
 
 
Peter Rilling
Guest
Posts: n/a
 
      12-22-2004
You seem to have the basic idea down.

"The Eeediot" <> wrote in message
news:ru-dnSI9xYXkf1TcRVn-...
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!


 
Reply With Quote
 
=?Utf-8?B?UnVsaW4gSG9uZw==?=
Guest
Posts: n/a
 
      12-22-2004
Add one thing: ViewState is used for postback. So everything is gone if you
refresh page.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VONAGE Newbie w/newbie question New_kid@nowhere.new VOIP 0 08-11-2007 01:40 PM
another newbie question from another newbie.... Lee UK VOIP 4 05-17-2005 04:10 PM
newbie: cisco vlan newbie question No Spam Cisco 3 06-07-2004 10:02 AM
dumb newbie question (or newbie dumb question) Jerry C. Perl Misc 8 11-23-2003 04:11 AM
Newbie! I'm a newbie! What's wrong with this program? Id0x Python 4 07-20-2003 11:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57