The LinkButton control creates hyperlink-style buttons that post back to the same page on which they origionated.
Note The LinkButton control requires some client-side script support in order to function.
Required properties are noted in boldface type.
<asp:LinkButton id="LinkButton1" runat="server" Text="label" Command="command" CommandArgument="commandArgument" OnClick="OnClickMethod" /> or <asp:LinkButton id="LinkButton1" runat="server" Command="command" CommandArgument="commandArgument" OnClick="OnClickMethod" /> Text </asp:LinkButton>
Property | Description |
---|---|
(Base control properties) | The properties defined in Base Web Control Properties. |
CommandArgument | Optional command argument used in conjunction with the value of the Command property. Contains a value that should be bubbled when a button is clicked. For example, if the Command property is set to "Sort," the CommandArgument property might be set to "Ascending" or "Descending." |
Command | Command that should be bubbled when a button embedded in a container control is clicked. The value set in this property is available as an argument of the OnItemCommand event of the container control. For example, if the LinkButton control is in a DataList control, the Command might be set to "Sort." You can pass additional information using the CommandArgument property. |
Text | The button caption. |
Event (and paramters) | Description |
---|---|
OnClick(Object sender, EventArgs e) | Raised when the user clicks the button. This event always causes the page to be posted to the server.
The e events argument object has no properties. |
To be supplied.
See Also