Q:

What is the difference between SessionState and ViewState in c#?

0

What is the difference between SessionState and ViewState?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

There are the following differences between the session state and ViewState.

  • Session state is saved on the server, ViewState is saved in the page.
  • An important point that the ViewState travels up and down between client and server, but SessionState stays on the server.
  • Session state is usually cleared after a period of inactivity from the user (no request happened containing the session id in the request cookies).
  • The view state is posted on subsequent posts back in a hidden field.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C# Interview Questions and Answers,You Need To Know

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What’s the difference between a method and a fun... >>
<< What are I/O classes in C#? Define some of the mos...