<%@ Page Language="C#" %>
<script runat="server">
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("Postback!");
}
</script>
<script language="javascript" type="text/javascript">
function AlertHello()
{
alert('Hello ASP.NET');
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Button Server Control</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="Button1"
Runat="server"
Text="Button"
OnClientClick="AlertHello()"
OnClick="Button1_Click" />
</form>
</body>
</html>
|