<script language="C#" runat="server">
protected void Page_Load(object o, EventArgs e) {
if(IsPostBack) {
CreateClientSideMessageBox("IsPostBack is true");
}
else {
CreateClientSideMessageBox("IsPostBack is false");
}
}
protected void CreateClientSideMessageBox(string message) {
Response.Write("<script language=\"javascript\">");
Response.Write("alert(\"" + message + "\");");
Response.Write("</" + "script>");
}
</script>
<form runat="server">
this page displays a client side message box<br/>
<asp:button runat="server" Text="go" />
</form>
|