asp.net.ph

LinkButton Class

System.Web.UI.WebControls Namespace


Renders a hyperlink style button for posting a Web form back to the server.

LinkButton Class Members

Collapse   Constructors

Visibility Constructor Parameters
public LinkButton ( )

Collapse   Properties

Visibility Name Value Type Accessibility
public CausesValidation Boolean [ Get , Set ]
public CommandArgument String [ Get , Set ]
public CommandName String [ Get , Set ]
public OnClientClick String [ Get , Set ]
public PostBackUrl String [ Get , Set ]
public SupportsDisabledAttribute Boolean [ Get ]
public Text String [ Get , Set ]
public ValidationGroup String [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
protected AddAttributesToRender ( HtmlTextWriter writer ) Void
protected AddParsedSubObject ( Object obj ) Void
protected GetPostBackOptions ( ) PostBackOptions
protected LoadViewState ( Object savedState ) Void
protected OnClick ( EventArgs e ) Void
protected OnCommand ( CommandEventArgs e ) Void
protected RaisePostBackEvent ( String eventArgument ) Void

Collapse   Events

Multicast Name Type
multicast Click EventHandler
multicast Command CommandEventHandler

Remarks

Use the LinkButton control to create a hyperlink style submit or command button that posts the page back to the server.

By default, a LinkButton control is a submit button, which simply posts the Web page back to the server. To programmatically control the action performed when the linkbutton is clicked, you define an event handler for the linkbutton's Click event.

A command linkbutton, on the other hand, is a LinkButton control that can be used to invoke commands. This is basically done by associating the linkbutton with a CommandName ( ex. select, sort, edit, update, delete, etc. ). This allows you to create multiple LinkButton controls on a Web page and programmatically determine which linkbutton is clicked.

An optional CommandArgument property can be used with a command linkbutton to provide additional information about the command to perform ( ex. ascending ). Likewise, to programmatically control the actions performed when the command linkbutton is clicked, you define an event handler for the linkbutton's Command event.

For examples illustrating use of this control, see the individual member types of this class. For syntax information, see LinkButton in ASP.NET Syntax for Web Controls.

See Also

Button   ImageButton   HyperLink Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph