<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object Sender, EventArgs e) {
if (!Page.IsPostBack) {
lblMessage.Text = "Hello world!!!!";
}
}
void Submit(Object Sender, EventArgs e) {
lblMessage2.Text = "Form posted";
}
</script>
<html><body>
<form runat="server">
<asp:Button id="btSubmit" runat="server" Text="Submit" onClick="Submit" />
<asp:Label id="lblMessage" runat=server />
<asp:Label id="lblMessage2" runat=server />
</form>
</body></html>
|