<%@ Page Language="C#" %>
<script runat="server">
public void DetectChange(object sender, EventArgs e)
{
HtmlInputCheckBox cb = (HtmlInputCheckBox) sender;
Response.Write("Control <b>" + cb.UniqueID + "</b> changed<br>");
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Server changes</title>
</head>
<body>
<div id="pageContent">
<form id="Form1" runat="server">
<input runat="server" type="checkbox" id="one"
onserverchange="DetectChange" />One<br />
<input runat="server" type="checkbox" id="two"
onserverchange="DetectChange" />Two<br />
<input runat="server" type="checkbox" id="three"
onserverchange="DetectChange" />Three<br />
<input runat="server" type="submit" value="Submit" />
</form>
</div>
</body>
</html>
|