Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
ASP.NET Programming
Mobile Devices
 Device-Specific Composition

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
ASP.NET Mobile Web Pages 
Device-Specific Composition 

Although general composition is a useful feature, you can also compose the contents of a control differently based on the target device. Device-specific composition can enable some interesting scenarios. For example, you might want to compose an ImageMap control from an Image ASP.NET mobile control on one device and a set of Command mobile controls on another device.

Although you can insert device-specific code into the CreateChildControls method of a control, using such a technique is not recommended. Instead, create device-specific control adapters when attempting device-specific composition. You can create a new adapter class for each type of device, overriding the appropriate methods and adding controls to the control tree where appropriate. By creating new device adapters, you can easily change the control behavior for a new device with minimal changes to the control itself.

See Also

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker