Proprietà Format
Imposta o restituisce lo stile di rendering del comando.
public System.Web.UI.MobileControls.CommandFormat Format {
get,
set}
Osservazioni
Accedere ai due tipi disponibili mediante l'enumerazione CommandFormat.
Valore | Descrizione |
---|---|
CommandFormat.Button (predefinito) | Il rendering del comando viene eseguito come pulsante. |
CommandFormat.Link | Il rendering del comando viene eseguito come collegamento. |
Nota La proprietà Format supporta il valore ComandFormat.Link solo nei dispositivi che supportano JavaScript (proprietà HttpBrowserCapabilities.JavaScript == true).
Esempio
Nell'esempio che segue viene illustrato come utilizzare la proprietà Format per eseguire il rendering del comando come collegamento.
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>
Vedere anche
Si applica a: classe Command