<% @Page Language="vb" %>
<html>
<head>
<title>IsPostBack Demonstration</title>
<script runat="server" >
Sub Page_Load(Sender As Object, e As EventArgs)
If Not IsPostBack Then
lblMessage.Text = "Before PostBack"
Else
lblMessage.Text = "Posted Back"
End If
End Sub
</script>
</head>
<body>
<h1>Demonstration of IsPostBack property</h1>
<form id="frmPostBack" runat="server">
<asp:label id="lblMessage" runat="server"/>
<asp:Button type="Submit" text="Post Back" runat="server"/>
</form>
</body>
</html>
|