Wednesday, August 23, 2017
 
Code Search
 
Code Bank
 
.NET Applications
XSD Schema Generator
 
.NET/XML Training




 







Target Multiple Devices with a Custom ASP.NET Server Control and XSLT
Description

There are several different ways to target multiple devices such as browsers, PDAs, and phones in the .NET platform including the Mobile Internet Toolkit and .NET Smart Device Extensions. This sample application demonstrates how to write a custom ASP.NET server control that can target a variety of devices using XML and XSLT.

The server control is called MultiDeviceTransform and is simple to use, yet capable of more advanced tasks as needed by an application such as passing parameters to XSLT stylesheets and using a variety of XML sources. For example, the control can transform static XML documents as well as XML data obtained from the following sources:

  • XmlDocument Class
  • XmlTextReader Class
  • DataSet Class
  • SQL 2000 HTTP Queries
  • SQL 2000 Template Queries
  • SQL 2000 EXPLICIT Queries
Using the control is as simple as adding a TagPrefix, Namespace, and Assembly reference to an ASP.NET page along with the control-specific code.

Configuration information for "uplevel" and "downlevel" browsers as well as different devices such as PDAs and Web-enabled phones is stored in a configuration file called device.config. The MultiDeviceTransform server control code is available in both C# and VB.NET.


Teaches ASP.NET, XML, Custom Server Controls, C#, VB.NET, XSLT, much more!
Requirements .NET 1.0
Example: Click Here
View Source Code: Click Here
Download Code: Click Here

 


.NET, SharePoint and Silverlight Training Solutions
    Online, Onsite and Video Training on .NET and SharePoint technologies available through The Wahlin Group.



© 2007 Wahlin Consulting LLC
XML for ASP.NET Developers in bookstores
Get XML for ASP.NET
Developers