STATE MANAGEMENT IN ASP.NET PART-I

Posted on Updated on

Image result for ASP.NETSTATE  MANAGEMENT – I

Another occasion of the Web page class is made every time the page is presented on the server. In customary Web programming, this would regularly imply that all data connected with the page and the controls on the page would be lost with each round outing. For instance, if a client enters data into a content box, that data would be lost in the round trek from the program or customer gadget to the server. To defeat this intrinsic constraint of conventional Web programming, ASP.NET incorporates a few alternatives that help you save information on both a for every page premise and a vast premise.

These components are as per the following:

  • Viewstate
  • Controlstate
  • Hiddenfields
  • Cookies
  • Querystrings
  • Applicationstate
  • Sessionstate
  • ProfileProperties

View state, control state, hidden fields, cookies, and query strings all include putting away information on the customer in different ways. In any case, application state, session state, and profile properties all store information in memory on the server. Every alternative has unmistakable points of interest and drawbacks, contingent upon the situation.

Client-Based State Management Options

View State

The ViewState property gives a lexicon protest holding values between various solicitations for a similar page. This is the default strategy that the page uses to safeguard page and control property estimations between round treks.

At the point when the page is handled, the present condition of the page and controls is hashed into a string and spared in the page as a concealed field, or numerous shrouded fields if the measure of information put away in the ViewState property surpasses the predetermined esteem in the MaxPageStateFieldLength property. At the point when the page is presented back on the server, the page parses the view-state string at page introduction and reestablishes property data in the page.

The View State property gives a lexicon protest holding values between various solicitations for a similar page. This is the default strategy that the page uses to safeguard page and control property estimations between round treks. At the point when the page is handled, the present condition of the page and controls is hashed into a string and spared in the page as a concealed field, or numerous shrouded fields if the measure of information put away in the ViewState property surpasses the predetermined esteem in the MaxPageStateFieldLength property. At the point when the page is presented back on the server, the page parses the view-state string at page introduction and reestablishes property data in the page.

You can store values in view state too. For more data on utilizing View State, see ASP.NET View State Overview.

Control State

In some cases you have to store control-state information all together for a control to work legitimately. For instance, in the event that you have composed a custom control that has distinctive tabs that show diverse data, all together for that control to act not surprisingly, the control needs to know which tab is chosen between round excursions. The ViewState property can be utilized for this reason, yet see state can be killed at a page level by designers, adequately breaking your control. To tackle this, the ASP.NET page structure uncovered a component in ASP.NET called control state. The ControlState property permits you to endure property data that is particular to a control and can’t be killed like the ViewState property.

*****************************************************************************************************

For more details and queries please feel free to email, visit or call us. Wishing you the very best for all your future endeavors.
Helpline: 9814666333, 8699444666
Email: info@technocampus.co.in

Please fill the form and we shall contact you soon.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s