Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

browser detect then change css file if in ie6 or below .net

Posted on 2008-10-15
3
Medium Priority
?
1,191 Views
Last Modified: 2012-05-05
Hi guys, i currently have a css file, which is referenced from my config file, this works fine in firefox 2 and 3, google chrome, opera, safari and ie7, however when i view it in ie6 it looks awful, so i have set up a theme for ie6. Now what i need to do is have some piece of code that changes the line of code in the config file to the theme for ie6 if the users browser is ie6 or below, this bit of code can go into my masterpage file of course, does anyone have an idea of how to do this in .net, im programming in c#

Thanks
0
Comment
Question by:Ianaldo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
GeoffSutton earned 2000 total points
ID: 22750461
Hi Ianaldo.

Take a look at http://forums.asp.net/t/1024266.aspx - it has basically the same problem you would like to take care of.

As for browser detection, see http://nlakkakula.wordpress.com/2008/09/11/browser-detection-in-code-behind-aspnet/

This is really a simple means.  Also you can do much the same thing from clientside, and add a new stylesheet element to the DOM, and set the source via Ajax, but I don't have specific information on hand on how to take that approach.

I hope this helps,

Geoff
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question