Format Property
Sets or returns the render style for the command.
public System.Web.UI.MobileControls.CommandFormat Format {
get,
set
}
Remarks
Access the two available types through the CommandFormat enumeration.
Value | Description |
---|---|
CommandFormat.Button (default) | The command is rendered as a button. |
CommandFormat.Link | The command is rendered as a link. |
Note The Format property supports the ComandFormat.Link value only on devices that support JavaScript (HttpBrowserCapabilities.JavaScript property == true).
Example
The following example demonstrates how to use the Format property to render the command as a link.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CmdMSFT.Format = CommandFormat.Link
End Sub
<mobile:form id="myForm" runat=server Alignment=center>
<mobile:command id="CmdMSFT"
CommandArgument="70" CommandName="MSFT"
runat="server" Text="MICROSOFT" />
<br/><br/>
</mobile:form>
[C#]
private void Page_Load(object sender, System.EventArgs e)
{
CmdMSFT.Format = CommandFormat.Link;
}
<mobile:form id="myForm" runat=server Alignment=center>
<mobile:command id="CmdMSFT"
CommandArgument="70" CommandName="MSFT"
runat="server" Text="MICROSOFT" />
<br/><br/>
</mobile:form>
See Also
Applies to: Command Class