Your SlideShare is downloading. ×
State Management In ASP.NET And ASP.NET MVC
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

State Management In ASP.NET And ASP.NET MVC

8,146

Published on

As we all know HTML is stateless language. It cannot persist state, so every web development framework provides facility to maintain state in one way or another way. There are different techniques …

As we all know HTML is stateless language. It cannot persist state, so every web development framework provides facility to maintain state in one way or another way. There are different techniques available for state management in ASP.NET and ASP.NET MVC. Following is summary of all such techniques for maintaining state.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
8,146
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
81
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Articles from Jinal Desai .NETState Management in ASP.NET and ASP.NET MVC2013-03-15 17:03:17 Jinal DesaiAs we all know HTML is stateless language. It cannot persist state, so every webdevelopment framework provides facility to maintain state in one way or anotherway. There are different techniques available for state management in ASP.NET andASP.NET MVC. Following is summary of all such techniques for maintaining state.Client Based State Management Options The ViewState property provides a dictionary object for retainingView State values between multiple requests for the same page. The ControlState property allows you to persist property informationControl that is specific to a control and cannot be turned off like the ViewStateState property.Hidden A HiddenField control stores a single variable in its Value property andFields must be explicitly added to the page. A cookie is a small amount of data that is stored either in a text file onCookies the client file system or in-memory in the client browser session.Query A query string is information that is appended to the end of a pageString URL.View ViewData is a dictionary of objects accessible using strings as keys.Data(MVC)View ViewBag is a dynamic property. It does not require typecasting forBag(MVC) complex objects. TempData is a dictionary of string key and object value. TempDataTemp keep the information for the time of an HTTP Request. This mean onlyData(MVC) from one page to another.Server Based State Management OptionsApplication Application state is a global storage mechanism that is accessibleState from all pages in the Web application.Session Session state is similar to application state, except that it is scoped toState the current browser session. Profile Properties is similar to Session State. The profile-propertiesProfile feature uses an ASP.NET profile, which is stored in a persistent formatProperties and associated with an individual user.

×