When we want to execute another Code(Basically, it is the default data binding), and even want some code to be executed at each loading except the first loading. We can use the ispostback feature to complete this function. When a webpage is loaded for the first time, the value of this attribute is false. If the webpage is reloaded due to sending back, the value of the ispostback attribute is set to true.
Application in ASP. NETProgramIf you want to perform initialization operations when the page is displayed for the first time, you must determine the ispostback attribute!
In ASP. net use page. ispostback, you can avoid extra work on the round-trip: If you process the Server Control to send back, you usually need to execute the code on the first request page, this code is different from the code used for round-trip when an event is triggered. If check? Page. ispostback? The code can be executed according to the conditions, depending on whether there is an initial request to the page or a response to the server control event. This seems obvious, but you can ignore this check without changing the page behavior. The usage of this attribute is directly related to whether your program runs as expected, and the efficiency of the entire page. Because, if you bind data to the control every time, no matter whether you access the control for the first time or submit the data, the efficiency of the page program can be imagined.