Working with Device Updates


ASP.NET device updates provide support for additional browsers. The new support can come as new configuration data or in the form of new mobile control adapters. New configuration data consists of browser capabilities that accurately describe the browser features and map the browser to the correct adapters. The browser capabilities are also utilized by the adapters to accommodate any idiosyncrasies and to produce the best markup possible for the device. New adapters also rely on configuration data, and when the existing adapters can’t render markup for the new browser, a new adapter that renders the required markup must be developed.

The browserCaps configuration section is often customized when adding support for a new browser, as we’ll discuss in the next section. Device updates add new browserCaps information by adding a new file containing additional browser data. Any modifications you make directly to machine.config are left intact. The new file is referenced in the browserCaps section with a file element.

<browserCaps>
<result type="System.Web.Mobile.MobileCapabilities" />
<file src="/books/2/540/1/html/2/deviceUpdate1.config" />
</browserCaps>

The machine.config browserCaps section is matched first, followed in turn by each file referenced with a file element. So, an expression match in a browserCaps file reference can override the capability setting of a match for one of the regular expressions found in machine.config. For example, support for XHTML was added in ASP.NET Device Update 2. A browser that supports both WML and XHTML might be configured in the machine.config file to use WML, but the deviceUpdate1.config file can override the preferred rendering type to XHTML-MP (a mobile profile version of XTHML) so that it can use the XHTML rendering.

Tip

Device updates installed on ASP.NET 1 using the Mobile Internet Toolkit replace the browserCaps section in machine.config with new content. Customizations for the browserCaps section will be lost when installing Device Updates 1.




Microsoft ASP. NET Coding Strategies with the Microsoft ASP. NET Team
Microsoft ASP.NET Coding Strategies with the Microsoft ASP.NET Team (Pro-Developer)
ISBN: 073561900X
EAN: 2147483647
Year: 2005
Pages: 144

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net