Home / ASP.NET Wiki / HTML / Web Controls / LinkButton

LinkButton

 Rate It (12)

LinkButton control is used to create a hyperlink-style button on a Web Forms page. Specify the text to display in the LinkButton control by either setting the Text property or placing the text between the opening and closing tags of the LinkButton control. You can create either a submit button or a command button.

A submit button does not have a command name associated with the button and simply posts the Web page back to the server. By default, a LinkButton control is a submit button. You can provide an event handler for the Click event to programmatically control the actions performed when the submit button is clicked.

By setting the CommandName property, you can associate a command name with the command button, such as Sort. This allows you to create multiple LinkButton controls on a Web page and programmatically determine which LinkButton control is clicked. You can also use the CommandArgument property with a command button to provide addition information about the command to perform, such as Ascending. You can provide an event handler for the Command event to programmatically control the actions performed when the command button is clicked.

 

Revision number 2, Tuesday, February 26, 2008 1:44:25 AM by mbanavige

Comments

Good info... not what i am looking for though. Trying to use Linkbutton to open a pdf file for display. I know how to do this with a link but am exploring this.

Related Articles

Asp.net server controls in BlackBerry Browser

Hi All,Some of the asp.net server controls(.NET 2.0) like DropDownList control, LinkButton etc., has postback property. When User clicks or selects these controls, a Postback will occur. Let us consider LinkButton control, which is extension of the HyperLink

Asp.net 2.0 Cross Post backing

This is new Concept Introduce in Asp.net 2.0, This is used to Passing the values from one page to Certain page using PostbakUrl property for Button, LinkButton, and Image Button from that easily values can be access by prevoius pageBelow is example For the

Export GridView records to Excel

In this Articlewe are going to read and understand how in a web application we can export a gridview data into Excel file. As many times in real time programming we generate reports in the grid format to display to the user. For example The list of commodities

Shortcuts

Table of Contents

Top Wiki Contributors

(last 30 days)

  1. abiruban (1)