ASP.NET LinkButton Control
Definition and Usage
The LinkButton control is used to create a button with hyperlink style.
Note:The appearance of the control is the same as that of the HyperLink control, but its function is the same as that of the Button control.
Property
Property | Description | .NET |
---|---|---|
CausesValidation | Specifies whether the page is validated when the LinkButton control is clicked. | 1.0 |
CommandArgument | Additional information about the command executed. | 1.0 |
CommandName | Command related to the Command event. | 1.0 |
OnClientClick | The name of the function that is executed when the LinkButton control is clicked. | 2.0 |
PostBackUrl | The URL of the target page from which the postback occurs when the LinkButton control is clicked. | 2.0 |
runat | Specifies that the control is a server control. It must be set to "server". | 1.0 |
Text | Text on the LinkButton. | 1.0 |
ValidationGroup | The control group targeted by the validation caused by the LinkButton control when it posts back to the server. | 2.0 |
Standard Web Control Properties
AccessKey, Attributes, BackColor, BorderColor, BorderStyle, BorderWidth CssClass, Enabled, Font, EnableTheming, ForeColor, Height, IsEnabled SkinID, Style, TabIndex, ToolTip, Width
For a complete description, please visit Standard Web Control Properties.
Standard Control Properties
AppRelativeTemplateSourceDirectory, BindingContainer, ClientID, Controls EnableTheming, EnableViewState, ID, NamingContainer, Page, Parent, Site TemplateControl, TemplateSourceDirectory, UniqueID, Visible
For a complete description, please visitStandard Control Properties.
Example
- LinkButton
- In this example, we declare a LinkButton control and a Label control in the .aspx file. When the user clicks on this link, the lbClick subroutine will be executed. This subroutine will send the text "You clicked the LinkButton control" to the Label control.