|
|
Targeting different browsers with ASP, XML, XSL
With ASP you can find out the browser which the user is using to browse your website content and accordingly you can provide the content needed for them.

To target different browsers, you have to create content in an xml file and create xsl for different browsers. The xml file which has the content is common for all the browsers and the difference in presentation is given by the xsl sheet that is used to target different browsers.
Create server objects of type XMLDOM for the xml and the xsl file to load them. Then load the xml file first and then use the Request.ServerVariables to get the value of HTTP_USER_AGENT and find out the browser that is used by the user.
Now based on the agent, load the appropriate xsl file for displaying the content. While you load the xml or the xsl file use Server.MapPath to load the xml or the xsl file to the object. Use the xml object's transformNode method to display the content using the xsl file.

FREE Subscription
Subscribe to our mailing list and receive new articles
through email. Keep yourself updated with latest
developments in the industry.
Note : We never rent, trade, or sell my email lists to anyone. We assure that your privacy is respected
and protected.
_______________________________________
|
|
FREE Subscription
Stay Current With the Latest Technology Developments Realted to XML. Signup for Our Newsletter and Receive New Articles Through Email.
Note : We never rent, trade, or sell our email lists to anyone. We assure that your privacy is respected and protected.
|
|