LinkButton control
ASP.NET LinkButton Control
Web server control
Definition and usage
LinkButton control Used to create hyperlink style buttons.
Notes: This control looks the same as the HyperLink control, but functions the same as the Button control.
Properties
Properties | Description | .NET |
---|---|---|
CausesValidation | Specifies whether to validate the page when the LinkButton control is clicked. | 1.0 |
CommandArgument | Additional information about the executed command. | 1.0 |
CommandName | The 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 to post back from the current page when the LinkButton control is clicked. | 2.0 |
runat | Specifies that the control is a server control. Must be set to "server". | 1.0 |
#Text | The text on the LinkButton. | 1.0 |
ValidationGroup | The control group for which this LinkButton control causes validation when it posts back to the server. | 2.0 |
Web control standard properties
AccessKey, Attributes, BackColor, BorderColor,
BorderStyle, BorderWidth, CssClass, Enabled, Font, EnableTheming,
ForeColor, Height, IsEnabled, SkinID, Style, TabIndex, ToolTip, Width
For a complete description, visit Web Control Standard Properties.
Control standard properties
AppRelativeTemplateSourceDirectory, BindingContainer,
ClientID, Controls, EnableTheming, EnableViewState, ID, NamingContainer,
Page, Parent, Site, TemplateControl, TemplateSourceDirectory, UniqueID,
Visible
For a complete description, visit Control Standard Properties.
Example
LinkButton
In this example, we declare a LinkButton control and a Label control in the .aspx file. When the user clicks this link, the lbClick subroutine is executed. This subroutine sends the text "You clicked the LinkButton control" to the Label control.
Web Server Control