The Button control presents a standard command button, which is rendered as an HTML input element. Using a Button control on ASP.NET web pages allows users to indicate that they have completed the form or that they want to perform a specific command. Web server controls include three kinds of buttons, each of which appears differently on web pages: Button control, LinkButton, and ImageButton.

When a user clicks any of the three types of buttons, a form is submitted to the server. This causes the web page to be processed and any pending events to be raised in server-based code. For details about writing code for button controls, see Button Web Server Controls Overview Cc295204.xtlink_newWindow(en-us,Expression.40).png in the MSDN library.

To add a Button control to a page

  1. Drag the Button control from the Toolbox panel to your page.

  2. Set properties for the control in the Tag Properties panel.

For more information about Button control tag properties, see Button Members Cc295204.xtlink_newWindow(en-us,Expression.40).png in the MSDN library.

See also

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.

Community Additions