Difference between ViewState and SessionState

Posted by Emrananish under C# on 9/27/2012 | Points: 10 | Views : 6400 | Status : [Member] | Replies : 4
ViewState SessionState
1-View state is maintained in page level only.
Session state is maintained in session level.
2-View state of one page is not visible in another page.i.e., when user requests another page previous page data will be no longer available.
Session state value is available in all pages within a user session.i.e., The data will be no longer available if user close thebrowser or session timeout occurs.
3-View state information stored in client only.
Session state information stored in server.
4-View state persist the values of particular page in the client (browser) when post back operation done.
Session state persist the data of particular user in the server. This data available till user close the browser or session time completes.
5-View state used to persist page-instance-specific data.
Session state used to persist the user-specific data on the server side.

emran


Responses

Posted by: Bhupentiwari on: 9/28/2012 [Member] Starter | Points: 25

Up
0
Down
thanx emran but post in article section by providing very good example

Thanks n Regards
Bhupendra Tiwari

Emrananish, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hariinakoti on: 9/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Emrananish,
This is for doubts forum u can post in interview forum.Thanq for posting.

Thanks & Regards
Hari

Emrananish, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pgayath on: 9/28/2012 [Member] Starter | Points: 25

Up
0
Down
A good one
Please post in appropriate forums as it might misguide people.

Emrananish, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 9/28/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi Emrananish,
good one for beginers
This is for doubts forum u can post to codes or interview section.

Mark as Answer if its helpful to you

Emrananish, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response