HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
It is an event handler for a given event to execute code in the subroutine.
Consider the following code:
The above code will be executed when? The answer is: "I do not know /en/en"
Page_Load event is one of many events ASP.NET understandable. Page_Load event is triggered when the page is loaded, ASP.NET will automatically call the subroutine Page_Load, and executes the code:
Note: Page_Load event contains no object references or event arguments!
Page_Load subroutine runs when the page is loaded each time. If you want to perform Page_Load subroutine code when the page first loads, you can use Page.IsPostBack property. If Page.IsPostBack property is set to false, the page is first loaded. If set to true, then the page is transmitted back to the server (for example, by clicking the button on the form):
The above examples show "The date and time is /en/en" message only when the page is first loaded. When the user clicks the Submit button is the, submit subroutine will write "Hello World!" In the second label, but the date and time of the first label will not change.