1

Can anyone suggest a reliable way to load a different view depending on the current browser?

We have some markup on a view that is broken in IE. We'd like to load an alternate view in this case.

4

1 回答 1

2

Javascript

You can use an Internet Explorer conditional comment for this:

<![if !IE]>
 window.location.replace("http://www.newpage.foo/newpage.html");
<![endif]>

More Information: http://reference.sitepoint.com/css/conditionalcomments

ASP.Net MVC

if (Request.Browser.Browser == "IE")
{
     }
于 2012-04-27T04:29:20.927 回答