Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between viewstate and controlstate

Tags:

asp.net

What is the difference between ViewState and ControlState in terms of IsPostBack and how they work?

What is the actual use of ControlState?

like image 464
minakshi Avatar asked Feb 05 '13 07:02

minakshi


2 Answers

Control state is a new construct within ASP.NET 2.0, and it is really nothing more than view state; however, it is view state with a significant advantage; that advantage is that other developers using your control cannot disable control state as they can view state.

http://www.codeproject.com/Articles/15300/Using-Control-State-in-ASP-NET-2-0

like image 75
Parv Sharma Avatar answered Oct 31 '22 08:10

Parv Sharma


The ViewState & ControlState both stores the control properties ,you can disable the ViewState Property only and that will not affect the ControlState at all which loads in the page first loading or if the page is postBack the controlState already loads from saved memory

like image 34
fady massoud Avatar answered Oct 31 '22 10:10

fady massoud