the next day

xiaoxiao2021-03-06  23

Postback's question: Page isPostBack property is used to resolve this issue. Because Page_Load is running at each page, the code is returned

(Postback) will also be executed. This is not required or not allowed in general.

Page Procedure: 1 Server Round: The server is responsible for dynamically create a page and passes the page to the client. The client is responsible for giving information and getting information from the user, at the same time

There is a choice to perform a client script. In ASP.NET, the information is delivered between the server client is relying on the HTTP request implementation. 2 ViewState: Web Forms is the state of HTTP communication. This means that the server is not Keep any information about the previous customer request.

Means that the server often wants to do a lot of additional work every time the round-trip execution process, and the Web Forms practice is

Use ViewState. The page stores your own ViewState.ViewState between the two requests of the server contains all users on the page.

The status of the control. By using the System.Web.Ui.StateBag object, this information is stored in the name-value pair. ViewState in the page is

Store to hidden form fields. For example: Web Forms Read ViewState and restores the server control while submitting this page to the server Value. It is a bit of the state and page.

Store storage, not stored in the server. Damage is that the content of ViewState may increase in the complex page.

The speed of the load. Note: All server controls support for all server controls by default. Of course, you can also close the page level ViewState - not saving the page.

The status of any control: <% @ page enableViewState = "false"%> Based on step-by-step ideas, you want to implement ViewState for a control, you can: 3 Page Procedure Step A. If the configuration phase is a return operation, the viewstate of the page and the control will then be restored. After recovery, the system will inspire Page_Load

Events. B. Event processing phase c. Display phase d. Clear phase The first event first occurs in this stage is Page_unload, the work should be completed: Turn off any open database connection, any open

Documents and delete any objects used for the page (most cases object references). 4 Web Form Events and traditional event driver programming models are different, although events can still be used and processed in the client (

Just like the events that appear and processed in the server, the main web form event model applies to the client but in the server.

Events for processing. This control shift is achieved by using HTTP POST. Event: There are several servers such as: Repeater, DataList, and DataGrid, you can include other self-controls. These sub-controls

The piece does not actively generate its own events to process in the page. The actual situation is, the container (ie, the father control) packs the event and uses it as

The ItemCommand event is passed to the page. So this event will be inspired when you click a button in the REPEater. For example: