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

  • Home
  • SEARCH
  • 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 592203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:42:55+00:00 2026-05-13T15:42:55+00:00

I think i have identified a bug in the way ASP handles IE conditional

  • 0

I think i have identified a bug in the way ASP handles IE conditional comments (or html comments in general)..

In theory it should not handle them at all since they are meant for the client-side..

In practice ..

<!--[if IE 6]>
<!--include virtual="emptyfile.asp"-->
<![endif]-->

will return

<![endif]>

Yes, you read that correctly.. it will remove the opening of the comment include whatever is in the file and keep the closing comment tag..

This of’course will mess up the html and of’course make whatever was for the IE to be executed for all…

there are obvious workaround such as using server.execute to include your file instead of the include directive, which will work as expected..

Most likely it confuses the ending --> of the include directive with the opening <!-- of the html comment.. But it should not bother with html comments at all..

Is there a know reason this happens in this way ? or is it just a bug ?

  • 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-05-13T15:42:56+00:00Added an answer on May 13, 2026 at 3:42 pm

    This is not a bug.

    The asp include syntax expects to find the keyword #include in a markup comment. However it does not require that there only be white space from the end of the comment start sequence until the #include keyword. Hence this is quite legal:-

     <!-- pink elephants #include virtual="myinc.asp" -->
    

    This is also legal:-

     <!--
     #include virtual="myinc.asp"
     -->
    

    Now any subsequent occurence of the <!-- inside a comment is treated just like any other text. Hence this is still legal:-

    <!--
    <!-- #include virtual="myinc.asp" -->
    

    Its the first <!-- which begins the comment which is seen as an include marker by ASP. The second is just ignored text. The whole comment is replaced by the contents of the “myinc.asp” file. If the file happens to be empty then the comment is simply deleted.

    Now the extra [if IE 6]> is still just ignored text so the whole of [if IE 6>\r\n<!-- will be ignored text. Thus:-

    <!--[if IE 6>
    <!-- #include virtual="emptyfile.asp" -->
    

    Is replaced by the contents of “emptyfile.asp”. Any subsequent:-

    <![endif]-->
    

    Is sent verbatim.

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

Sidebar

Related Questions

I think I have a problem in understanding the proper way of using MVC.
I have an abstract class (I know that it will not compile this way,
I have a HTML document that I want to remove specific tags from, identified
I think I have a synchronization problem...It may be too basic..Please help.. I have
I think I have a basic understanding of REST, but something I'm stuck on
I think I have a conceptual misunderstanding and would appreciate an explanation. Within a
I think I have this working but I need advice. I'd like to know
I think i have a basic problem in understanding the dojo toolkit. Well I
I think I have a pretty simple goal but cant seem to reach it.
I have done everything that is on the web (i think) i have the

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.