{"id":104,"date":"2014-05-09T05:41:00","date_gmt":"2014-05-09T04:41:00","guid":{"rendered":"https:\/\/debuggersspace.com\/index.php\/2014\/05\/09\/what-are-the-different-state-management-in-asp-net\/"},"modified":"2014-05-09T05:41:00","modified_gmt":"2014-05-09T04:41:00","slug":"what-are-the-different-state-management-in-asp-net","status":"publish","type":"post","link":"https:\/\/debuggersspace.com\/index.php\/2014\/05\/09\/what-are-the-different-state-management-in-asp-net\/","title":{"rendered":"What are the different State management in ASP.NET?"},"content":{"rendered":"<div class='booster-block booster-read-block'>\n                <div class=\"twp-read-time\">\n                \t<i class=\"booster-icon twp-clock\"><\/i> <span>Read Time:<\/span>1 Minute, 54 Second                <\/div>\n\n            <\/div><div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"background-color: #f6f4ef; border: 0px; color: #222222; margin: 0px; padding: 0px; vertical-align: baseline;\">\n<span style=\"border: 0px; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">State management is the process by which you maintain state and page information over multiple requests for the same or different pages.<\/span><\/span><\/div>\n<div style=\"background-color: #f6f4ef; border: 0px; color: #222222; margin: 0px; padding: 0px; vertical-align: baseline;\">\n<span style=\"border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br \/><span style=\"font-weight: inherit;\">There are 2 types State Management:&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: inherit;\">1. <\/span><b>Client \u2013 Side State Management&nbsp;<\/b><br \/><span style=\"font-weight: inherit;\">This stores information on the client&#8217;s computer by embedding the information into a Web page, a uniform resource locator (url), or a cookie. The techniques available to store the state information at the client end are listed down below:&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: inherit;\">a. View State \u2013 Asp.Net uses View State to track the values in the Controls. You can add custom values to the view state. It is used by the Asp.net page framework to automatically save the values of the page and of each control just prior to rendering to the page. When the page is posted, one of the first tasks performed by page processing is to restore view state.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: inherit;\">b. Control State \u2013 If you create a custom control that requires view state to work properly, you should use control state to ensure other developers don\u2019t break your control by disabling view state.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: inherit;\">c. Hidden fields \u2013 Like view state, hidden fields store data in an HTML form without displaying it in the user&#8217;s browser. The data is available only when the form is processed.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: inherit;\">d. Cookies \u2013 Cookies store a value in the user&#8217;s browser that the browser sends with every page request to the same server. Cookies are the best way to store state data that must be available for multiple Web pages on a web site.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: inherit;\">e. Query Strings &#8211; Query strings store values in the URL that are visible to the user. Use query strings when you want a user to be able to e-mail or instant message state data with a URL.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: inherit;\">2. <\/span><b>Server \u2013 Side State Management&nbsp;<\/b><br \/><span style=\"font-weight: inherit;\">a. Application State &#8211; Application State information is available to all pages, regardless of which user requests a page.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: inherit;\">b. Session State \u2013 Session State information is available to all pages opened by a user during a single visit.&nbsp;<\/span><\/p>\n<p><span style=\"font-weight: inherit;\">Both application state and session state information is lost when the application restarts. To persist user data between application restarts, you can store it using profile properties.<\/span><\/span><\/span><br \/>\n<span style=\"border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"font-family: Arial, Helvetica, sans-serif;\"><span style=\"font-weight: inherit;\"><br \/><\/span><\/span><\/span><br \/>\n<span style=\"border: 0px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;\"><span style=\"font-family: Arial, Helvetica, sans-serif;\"><span style=\"font-weight: inherit;\"><a href=\"http:\/\/www.codeproject.com\/Articles\/492397\/State-Management-in-ASP-NET-Introduction\" target=\"_blank\" rel=\"noopener\">http:\/\/www.codeproject.com\/Articles\/492397\/State-Management-in-ASP-NET-Introduction<\/a><\/span><\/span><\/span><\/div>\n<div>\n<span style=\"border: 0px; font-family: Verdana, sans-serif; font-size: 10pt; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;\"><br \/><\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>State management is the process by which you maintain state and page information over multiple requests for the same or different pages. There are 2 types State Management:&nbsp; 1. Client \u2013 Side State Management&nbsp;This stores information on the client&#8217;s computer by embedding the information into a Web page, a uniform resource locator (url), or a [&hellip;]<\/p>\n","protected":false},"author":43,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[23,34],"tags":[],"class_list":["post-104","post","type-post","status-publish","format-standard","hentry","category-asp-net","category-ibm"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Himanshu Namdeo","author_link":"https:\/\/debuggersspace.com\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"State management is the process by which you maintain state and page information over multiple requests for the same or different pages. There are 2 types State Management:&nbsp; 1. Client \u2013 Side State Management&nbsp;This stores information on the client&#8217;s computer by embedding the information into a Web page, a uniform resource locator (url), or a&hellip;","_links":{"self":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts\/104"}],"collection":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/comments?post=104"}],"version-history":[{"count":0,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts\/104\/revisions"}],"wp:attachment":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/media?parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/categories?post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/tags?post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}