In actual programming, there will always be such a problem. Watching the old birds play freely in front of their computers, cainiao like me can only learn from each other over time ~
1. ispostback is an attribute of the bool type in the page class. It is used to determine whether the current form request is the first or not the first request. When ispostback = true, it indicates not the first request, which is called PostBack. When ispostback = false, it indicates the first request. There are many scenarios in the Asp.net framework that need to judge ispostback. operations such as loadallstate must be performed during PostBack. When we use webform for development, we often judge ispostback in page_load, because page_load is executed in the first request and page_load is executed in non-first request. Why do I have multiple requests for the same form? Asp.net introduces server-side events. controls that support server-side events will send requests to the current form. In this way, in many cases, we need to determine whether it is the first request to this form.
2. One sqlconnection can only open one datareader. When enabling another datareader, you must close the previous one first.