N
nly
Page.IsPostBack Property
"The Page_Load subroutine runs EVERY time the page is loaded. If you want to
execute the code in the Page_Load subroutine only the FIRST time the page is
loaded, you can use the Page.IsPostBack property. If the Page.IsPostBack
property is false, the page is loaded for the first time, if it is true, the
page is posted back to the server (i.e. from a button click on a form)..."
Let's say we have this in a "body" of an aspx page:
<form runat="server">
<h3><asp:label id="lbl1" runat="server" /></h3>
<asp:button text="Submit" onclick="submit" runat="server" />
</form>
What does it mean by "the page is posted back to the server"? What's exactly
posted back here in the above example?
Thanks in advance!
"The Page_Load subroutine runs EVERY time the page is loaded. If you want to
execute the code in the Page_Load subroutine only the FIRST time the page is
loaded, you can use the Page.IsPostBack property. If the Page.IsPostBack
property is false, the page is loaded for the first time, if it is true, the
page is posted back to the server (i.e. from a button click on a form)..."
Let's say we have this in a "body" of an aspx page:
<form runat="server">
<h3><asp:label id="lbl1" runat="server" /></h3>
<asp:button text="Submit" onclick="submit" runat="server" />
</form>
What does it mean by "the page is posted back to the server"? What's exactly
posted back here in the above example?
Thanks in advance!