{"id":92,"date":"2014-05-15T17:47:00","date_gmt":"2014-05-15T16:47:00","guid":{"rendered":"https:\/\/debuggersspace.com\/index.php\/2014\/05\/15\/what-is-viewstate\/"},"modified":"2014-05-15T17:47:00","modified_gmt":"2014-05-15T16:47:00","slug":"what-is-viewstate","status":"publish","type":"post","link":"https:\/\/debuggersspace.com\/index.php\/2014\/05\/15\/what-is-viewstate\/","title":{"rendered":"What is ViewState?"},"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>34 Second                <\/div>\n\n            <\/div><div dir=\"ltr\" style=\"text-align: left;\">\n<span style=\"font-family: Arial, Helvetica, sans-serif;\"><span style=\"background-color: white; line-height: 20px; text-align: justify;\">It is a state management technique in asp.net. ASP.NET Viewstate is preserving the data between the requests or postbacks and stored in hidden fields on the page. if you open the source of the aspx page you will see like&nbsp;<\/span><\/span><\/p>\n<pre style=\"background-color: #fafafa; border: 1px solid rgb(187, 187, 187); color: #007000; height: auto; line-height: 15px; margin-top: 1em; overflow: auto !important; padding: 0.99em; text-align: justify; white-space: pre-wrap; word-wrap: break-word;\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">&lt;input type=\"hidden\" name=\"__VIEWSTATE\" \n            value=\"dDwyMTQxMjc4NDIxO3Q8O2w8aTw4Pjs+O2w8dDwfg==&gt;<\/span><\/pre>\n<p><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br style=\"background-color: white; line-height: 20px; text-align: justify;\" \/><span style=\"background-color: white; line-height: 20px; text-align: justify;\">To disable viewstate in the application we need to configure in page for particular page only or web.config file for application level<\/span><br style=\"background-color: white; line-height: 20px; text-align: justify;\" \/><br style=\"background-color: white; line-height: 20px; text-align: justify;\" \/><span style=\"background-color: white; line-height: 20px; text-align: justify;\">To disable viewstate in page level<\/span><\/span><\/p>\n<pre style=\"background-color: #fafafa; border: 1px solid rgb(187, 187, 187); color: #007000; height: auto; line-height: 15px; margin-top: 1em; overflow: auto !important; padding: 0.99em; text-align: justify; white-space: pre-wrap; word-wrap: break-word;\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">&lt;%@  Page Language=\"C#\" AutoEventWireup=\"true\" CodeBehind=\"...\"\n    MasterPageFile...\" Inherits=\"...\"  EnableViewState=\"false\" %&gt;<\/span><\/pre>\n<p><span style=\"font-family: Arial, Helvetica, sans-serif;\"><br style=\"background-color: white; line-height: 20px; text-align: justify;\" \/><span style=\"background-color: white; line-height: 20px; text-align: justify;\">Add the following line in web.config file to disable the viewstate in application level<\/span><\/span><\/p>\n<pre style=\"background-color: #fafafa; border: 1px solid rgb(187, 187, 187); color: #007000; height: auto; line-height: 15px; margin-top: 1em; overflow: auto !important; padding: 0.99em; text-align: justify; white-space: pre-wrap; word-wrap: break-word;\"><span style=\"font-family: Arial, Helvetica, sans-serif;\">&lt;pages enableViewState=\"false\" \/&gt;<\/span><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>It is a state management technique in asp.net. ASP.NET Viewstate is preserving the data between the requests or postbacks and stored in hidden fields on the page. if you open the source of the aspx page you will see like&nbsp; &lt;input type=&#8221;hidden&#8221; name=&#8221;__VIEWSTATE&#8221; value=&#8221;dDwyMTQxMjc4NDIxO3Q8O2w8aTw4Pjs+O2w8dDwfg==&gt; To disable viewstate in the application we need to configure in [&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-92","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":"It is a state management technique in asp.net. ASP.NET Viewstate is preserving the data between the requests or postbacks and stored in hidden fields on the page. if you open the source of the aspx page you will see like&nbsp; &lt;input type=\"hidden\" name=\"__VIEWSTATE\" value=\"dDwyMTQxMjc4NDIxO3Q8O2w8aTw4Pjs+O2w8dDwfg==&gt; To disable viewstate in the application we need to configure in&hellip;","_links":{"self":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts\/92"}],"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=92"}],"version-history":[{"count":0,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/posts\/92\/revisions"}],"wp:attachment":[{"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/categories?post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/debuggersspace.com\/index.php\/wp-json\/wp\/v2\/tags?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}