How to: Add and Configure a Command ControlĀ 

Use the Command control to post user input to the server.

To add a Command control to an ASP.NET mobile Web page

  1. Drag a Command control from the Mobile Web Forms tab of the Toolbox onto a Form or Panel control, or inside a control's template on a mobile Web page. You can also drag it onto a mobile user control page.

  2. Set the Format property to specify whether the control appears as a Button or a Link.

  3. In the Properties window, set the control's Text property.

  4. In the SoftkeyLabel property, enter text to display when the Command control is rendered as a softkey.

  5. Set the control's CommandName property.

  6. If you want, configure other properties of the Command control. For example:

    1. If you want the control to display an image, set its ImageUrl property to the URL of the graphic file to display.

    2. If the Command control must pass a value to an event handler, enter the value into the CommandArgument property.

    3. If you do not want the Command control to cause validation, set its CausesValidation property to false.

See Also

Reference

Command

Concepts

Introduction to the Command Control
Overriding Properties
Introduction to the Form Control
Introduction to the Panel Control

Other Resources

Using Device Filters