|
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.
UN Report Urges Green Efforts in Latin America (Scoop.co.nz) A new United Nations report calls for greater efforts to advance environmentally sustainable development in Latin America and the Caribbean, which has witnessed the constant reduction of forest areas and the sustained increase of carbon dioxide emissions.
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.
_______________________________________
Recommended
XML Books
|
|