Currently. net is mostly used for the development of large websites. Let's take a look at the common examples of asp.net Page_Load and Page. IsPostBack.
Currently. net is mostly used for the development of large websites. Let's take a look at the common examples of asp.net Page_Load and Page. IsPostBack.
Let's take a look at the example of asp.net page_load.
<Script runat = "server">
Sub Page_Load
Lbl1.Text = "The date and time is" & now ()
End Sub
</Script>
<Html>
<Body>
<Form runat = "server">
<H3> <asp: label id = "lbl1" runat = "server"/> </Form>
</Body>
</Html>
Let's take a look at the asp.net ispostback example.
<Script runat = "server">
Sub Page_Load
If Not Page. IsPostBack then
Lbl1.Text = "The date and time is" & now ()
End if
End Sub
Sub submit (s As Object, e As EventArgs)
Lbl2.Text = "Hello World! Www.111cn.cn"
End Sub
</Script>
<Html>
<Body>
<Form runat = "server">
<H3> <asp: label id = "lbl1" runat = "server"/> <H3> <asp: label id = "lbl2" runat = "server"/> <Asp: button text = "Submit" onclick = "submit" runat = "server"/>
</Form>
</Body>
</Html>