What is ViewState?
ViewState is used to retain the state of server-side objects between page post backs. In ASP.NET, ViewState is a client-side state management technique used to preserve the state of server-side controls (such as textboxes, dropdown lists, etc.) across postbacks. When a web page is posted back to the server, ViewState stores the values of those controls in a hidden field on the page. When the page is reloaded, ASP.NET uses the ViewState to restore the state of the controls to…