<%@ Page Language="C#" %> <script runat="server"> void Button1_Click(Object Sender, EventArgs e) { Label1.Text = "You clicked <b>" + ((Button)Sender).Text + "</b>"; } </script> <html><body> <form runat="server"> <asp:Button id=Button1 runat="server" Text="Button1" onClick="Button1_Click" /> <asp:Label id=Label1 runat=server /> </form> </body></html>