Prev | Current Page 630 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"


??? Specify alternate image types that match detected device capabilities. We do this for the
Image1 image mobile control in the next example.
This fine-grained tuning available also allows you to override control properties through the
DeviceSpecific/Choice element mechanism. An example of this in the DeviceSpecific.aspx
mobile web page is the Image control that overrides its ImageURL property:





The default value is the .bmp file; however, there is a choice filter that states that a device
that prefers a .wbmp file should use the .wbmp file in place of the .bmp file.
Any control that inherits from MobileControl can contain one??”and only one??”
DeviceSpecific element. DeviceSpecific is a container element that hosts one or more Choice
elements. The Choice element has a filter attribute that plugs into the device capability decision
engine that is part of the mobile ASP.NET architecture.
494 CHAPTER 10 ?–  OTHER SERVER CONTROLS
In the case of the preceding Image control snippet of code, the Image control takes advantage
of the built-in WML rendering features via the prefersWBMP filter attribute value to look
for devices that prefer to render .


Pages:
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642