ObjectList::CommandStyle Property
Gets or sets the style used for the object list commands.
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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: