Elaborate differentiation between ViewState and SessionState?



Elaborate differentiation between ViewState and SessionState?..

Answer / Parvez Alam

ViewState and SessionState are both mechanisms in ASP.NET for storing and managing data, but they have some key differences:nn- ViewState: It is a hidden form field that stores state information for individual web form controls on the client side (in the user's browser). This information helps maintain the state of control properties between postbacks.n- SessionState: It is a server-side mechanism used to store data across multiple requests for a single user. SessionState can be stored in various modes like InProc, StateServer, SQLServer, and OutOfProcess.nnViewState is specific to web forms, while SessionState can be used with any type of control or custom user class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

Is there any limit for query string? Means what is the maximum size?

1 Answers  


What is the default timeout for a cookie?

1 Answers  


What is DTS package?

2 Answers   Accenture, TCS,


What asp.net control can embed xaml into asp.net pages?

1 Answers  


What are the session variables?

1 Answers  


How can u debug your .net application?

1 Answers  


Explain repository pattern in asp.net mvc? : asp.net mvc

1 Answers  


What are different templates available in Repeater,DataList and Datagrid ?

1 Answers  


What are the modes of updation in an updatepanel?

1 Answers  


What are user controls and custom controls ?

1 Answers  


how to write html code with ssl

1 Answers   DCI,


What is http post and http get?

1 Answers  


Categories