<asp:Button id="id" text="label" OnClick="sub" runat="server" /> |
id attribute defines a unique name for the button and the text attribute assigns a label to the button.
The OnClick event handler specifies a named subroutine to execute.
In the following example, a button click runs a subroutine which changes the text on the button:
|
demo_button.aspx |
Web |
|
|---|---|---|
|