The control view status is also a database, and the super-small key-Value Pair database.
The gridview control that directly deals with the database does not need to open the view status, because the modification is directly executed in the database and then reflected in the gridview control.
Sqldatasource, a data source control that directly deals with databases, does not need to enable the view status.
The client sends a request-> the server determines it is the first request or sending a response-> if sending a request, retrieve the value stored in the view State-> when the program is running, the user changes the control value, saved in view status.
Place the value of the listbox1 control to the listbox2 control, and then delete the value selected by listbox1. This requires the view status.
When the page is loaded for the first time, the value of listbox1 is initialized. Select a value and press the Add button to send the webpage back. The value of listbox1 decreases from the view state, and the value of listbox2 increases from the view State. The user selects a value again, the user presses the Add button for the second time, and the webpage returns again. The value of listbox1 decreases from the view state, and the value of listbox2 increases from the view State.
The view status of the listbox1 and listbox2 controls is canceled. The page is loaded for the first time, and the value of listbox1 is initialized. Select a value. Press the Add button to send the webpage back. The value of listbox1 is reduced, and the value of listbox2 is increased. The user selects a value again, the user presses the Add button for the second time, and the webpage returns again. The value of listbox1 is not reduced, and the value of listbox2 is not increased. Instead, it is replaced with the selected value.