ASP.NET Tutoria...login
ASP.NET Tutorial
author:php.cn  update time:2022-04-11 14:18:18

LinkButton control


ASP.NET LinkButton Control


up.gif 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

PropertiesDescription.NET
CausesValidationSpecifies whether to validate the page when the LinkButton control is clicked. 1.0
CommandArgumentAdditional information about the executed command. 1.0
CommandNameThe command related to the Command event. 1.0
OnClientClickThe name of the function that is executed when the LinkButton control is clicked. 2.0
PostBackUrlThe 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
#TextThe text on the LinkButton. 1.0
ValidationGroupThe 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.


up.gif Web Server Control

php.cn