Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9071659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:58:00+00:00 2026-06-16T17:58:00+00:00

When debugging my ASP.NET MVC (Razor-based) web site in IE10, I need to still

  • 0

When debugging my ASP.NET MVC (Razor-based) web site in IE10, I need to still set IE-specific css. When using IE conditional comments, the following syntax works, when switching IE10 to IE8 Standard rendering mode:

<!--[if IE]><!--> 
<link href="@Url.Content("~/Content/global/global.ie.css")" rel="stylesheet" type="text/css">
<!--<![endif]-->

And this – does not:

<!--[if IE]> 
<link href="@Url.Content("~/Content/global/global.ie.css")" rel="stylesheet" type="text/css">
<![endif]-->

The later syntax is given as an example one on most of the sites that provide info on conditional comments, including the official page on MSDN. What’s the difference between these two? Thank you in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:58:01+00:00Added an answer on June 16, 2026 at 5:58 pm

    Use “Downlevel-revealed Conditional Comments” to get it working…

    Syntax:

    <![if IE]>    
         ...statements...  
    <![endif]>
    

    Example:

    <![if IE]>    
        <link href="@Url.Content("~/Content/global/global.ie.css")" rel="stylesheet" type="text/css">  
    <![endif]>
    

    More info:

    The downlevel-revealed conditional comment syntax is flagged as invalid HTML by some validation services. Additional characters can be added to construct a valid HTML Comment before and after the HTML content to be revealed.

    <!--[if !IE]>--> 
        YOUR HTML 
    <!--<![endif]-->
    

    In the example above, the negative conditional expression prevents Internet Explorer from displaying the HTML content within the downlevel-revealed conditional comment block. However, if the conditional expression evaluates to true, the closing “–>” of the first comment appears along with the HTML content in Internet Explorer. To hide these characters from Internet Explorer users, add ”

    <!--[if !IE]><!--> 
        YOUR HTML 
    <!--<![endif]-->
    

    Examples:

    Here are some more examples of conditional comments.

    <!--[if IE]><p>You are using Internet Explorer.</p><![endif]-->
    <![if !IE]><p>You are not using Internet Explorer.</p><![endif]>
    
    <!--[if IE 7]><p>Welcome to Internet Explorer 7!</p><![endif]-->
    <!--[if !(IE 7)]><p>You are not using version 7.</p><![endif]-->
    
    <!--[if gte IE 7]><p>You are using IE 7 or greater.</p><![endif]-->
    <!--[if (IE 5)]><p>You are using IE 5 (any version).</p><![endif]-->
    <!--[if (gte IE 5.5)&(lt IE 7)]><p>You are using IE 5.5 or IE 6.</p><![endif]-->
    <!--[if lt IE 5.5]><p>Please upgrade your version of Internet Explorer.</p><![endif]-->
    
    <!--[if true]>You are using an <em>uplevel</em> browser.<![endif]-->
    <![if false]>You are using a <em>downlevel</em> browser.<![endif]>
    
    <!--[if true]><![if IE 7]><p>This nested comment is displayed in IE 7.</p><![endif]><![endif]-->
    

    contents taken from Valid HTML for downlevel-revealed conditional comments

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm debugging my ASP.NET MVC 3 web app using Google Chrome Developer Tools, and
I have built an ASP.NET MVC 3 web application (with exlusively Razor/cshtml pages) that
My ASP.NET MVC web app has a weird issue. In VS debugging mode it
I've got an ASP.NET MVC site up and running, but need to make one
Using ASP.NET MVC 4, jQuery 1.6.2, jQuery UI 1.8.11. Currently debugging in Firefox 16.0.2.
I need to modify source files while debugging my ASP.NET MVC app. I know
I am building an ASP.NET MVC web application and I'm using jQuery for some
I am currently developing an ASP.NET MVC 3 site using Visual Studio 2010 with
Until now I've always used the ASP.NET MVC framework source for debugging ASP.NET MVC.
Is there any tools or utilities to help in debugging ASP.NET MVC Routing issues?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.