ASP.NET LinkButtonControl


Web Server ControlsWeb Server Control

Definition and Usage

The LinkButton control is used to create a hyperlink-style button.

Note:The appearance of this control is the same as the HyperLink control, but its functionality is the same as the Button control.


Properties

Property Description .NET
CausesValidation Specifies whether the page is validated when the LinkButton control is clicked. 1.0
CommandArgument Additional information about the command to execute. 1.0
CommandName The command associated with the Command event. 1.0
OnClientClick The name of the function to execute when the LinkButton control is clicked. 2.0
PostBackUrl The URL of the target page for postback from the current page when the LinkButton control is clicked. 2.0
runat Specifies that this 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 the 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, please visitWeb 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, please visitControl Standard Properties。


Example

LinkButton
In this example, we declare a LinkButton control and a Label control in a .aspx file. When a user clicks the link, the lbClick subroutine is executed. This subroutine sends the text "You clicked the LinkButton control" to the Label control.


Web Server ControlsWeb Server Control Other Extensions