ObjectList.CommandStyle Property
Assembly: System.Web.Mobile (in system.web.mobile.dll)
If this property is programmatically set, it is not persisted unless the property is set dynamically on each request. If the property is set declaratively, the property is set on each request. There is no default.
Since different devices have different requirements for styles. You may want several DeviceSpecific settings for the CommandStyle property.
The following code example demonstrates how to the use the CommandStyle property to set the style of an ObjectList using a declarative DeviceSpecific section to specify different CommandStyle settings for different devices.
Note |
|---|
| The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information, see ASP.NET Web Page Code Model. |
This is a sample Web.config file with several device specific filters.
<configuration>
<system.web>
<compilation debug="true" />
<authentication mode="Windows" />
<customErrors mode="Off" />
<httpRuntime useFullyQualifiedRedirectUrl="true" />
<mobileControls cookielessDataDictionaryType="System.Web.Mobile.CookielessData" />
<deviceFilters>
<!-- Only a few filters are provided here -->
<filter name="isJPhone" compare="Type" argument="J-Phone" />
<filter name="isHTML32" compare="PreferredRenderingType" argument="html32" />
<filter name="isWML11" compare="PreferredRenderingType" argument="wml11" />
</deviceFilters>
</system.web>
</configuration>
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Note