Answered by:
How we used viewstate and what is the importance of viewstate in asp.net??

Question
-
User-361343671 posted
Explain in brief??Monday, November 27, 2017 12:20 PM
Answers
-
User475983607 posted
Explain in brief??ViewState is a very mature and well documented ASP.NET feature. Basically, ViewState maintains the state of all server controls in the web form across post backs.
Please see the openly published reference documentation.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, November 27, 2017 12:26 PM -
User-1838255255 posted
Hi Puspa.007,
According to your description, ViewState is used for save all control's state value, it is a object(name/value) collections. it is different from the session, it is belong to the page level, if you close the page, all value will be clear.
we could use it to store the form data or save table data provisional. About how to use it, please check the following samples:
What is View State and How it Works in ASP.Net:
http://www.c-sharpcorner.com/UploadFile/225740/what-is-view-state-and-how-it-works-in-Asp-Net53/
Using DataTable as Temporary storage table stored in viewstate in ASP.Net:
https://www.aspsnippets.com/Articles/Using-DataTable-as-Temporary-storage-table-in-ASPNet.aspx
Best Regards,
Eric Du
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, November 28, 2017 4:07 AM
All replies
-
User475983607 posted
Explain in brief??ViewState is a very mature and well documented ASP.NET feature. Basically, ViewState maintains the state of all server controls in the web form across post backs.
Please see the openly published reference documentation.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, November 27, 2017 12:26 PM -
User-1838255255 posted
Hi Puspa.007,
According to your description, ViewState is used for save all control's state value, it is a object(name/value) collections. it is different from the session, it is belong to the page level, if you close the page, all value will be clear.
we could use it to store the form data or save table data provisional. About how to use it, please check the following samples:
What is View State and How it Works in ASP.Net:
http://www.c-sharpcorner.com/UploadFile/225740/what-is-view-state-and-how-it-works-in-Asp-Net53/
Using DataTable as Temporary storage table stored in viewstate in ASP.Net:
https://www.aspsnippets.com/Articles/Using-DataTable-as-Temporary-storage-table-in-ASPNet.aspx
Best Regards,
Eric Du
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, November 28, 2017 4:07 AM