ASP.NET inserts trailing slash in tag

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Harlan Messinger

    ASP.NET inserts trailing slash in tag

    I created a new Web application in VS2005, and added a master page and a
    content page based on it. I replaced the default XHTML doctype directive
    with one for HTML 4.01 Strict.

    In the master page code I placed a link tag, without a slash before the
    closing ">". The compiler keeps sticking one in, so that the resulting
    page isn't valid HTML. I can't figure out how to keep the compiler from
    doing this. Please help!
  • David Wier

    #2
    Re: ASP.NET inserts trailing slash in tag

    Based on XHTML, all tags must have a closing tag, or be self-closing - why
    don't you just add the closing slash?

    David Wier

    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup


    "Harlan Messinger" <hmessinger.rem ovethis@comcast .netwrote in message
    news:61sihbF20f dgcU1@mid.indiv idual.net...
    >I created a new Web application in VS2005, and added a master page and a
    >content page based on it. I replaced the default XHTML doctype directive
    >with one for HTML 4.01 Strict.
    >
    In the master page code I placed a link tag, without a slash before the
    closing ">". The compiler keeps sticking one in, so that the resulting
    page isn't valid HTML. I can't figure out how to keep the compiler from
    doing this. Please help!

    Comment

    • Harlan Messinger

      #3
      Re: ASP.NET inserts trailing slash in tag

      David Wier wrote:
      >
      "Harlan Messinger" <hmessinger.rem ovethis@comcast .netwrote in message
      news:61sihbF20f dgcU1@mid.indiv idual.net...
      >I created a new Web application in VS2005, and added a master page and a
      >content page based on it. I replaced the default XHTML doctype directive
      >with one for HTML 4.01 Strict.
      >>
      >In the master page code I placed a link tag, without a slash before the
      >closing ">". The compiler keeps sticking one in, so that the resulting
      >page isn't valid HTML. I can't figure out how to keep the compiler from
      >doing this. Please help!
      >
      Based on XHTML, all tags must have a closing tag, or be self-closing - why
      don't you just add the closing slash?
      >
      I repeat: I'm not using XHTML, I'm using HTML 4.01.

      Comment

      • Mark Rae [MVP]

        #4
        Re: ASP.NET inserts trailing slash in tag

        "Harlan Messinger" <hmessinger.rem ovethis@comcast .netwrote in message
        news:61trfmF1vt j21U2@mid.indiv idual.net...
        I repeat: I'm not using XHTML, I'm using HTML 4.01.



        --
        Mark Rae
        ASP.NET MVP


        Comment

        • Harlan Messinger

          #5
          Re: ASP.NET inserts trailing slash in tag

          Mark Rae [MVP] wrote:
          "Harlan Messinger" <hmessinger.rem ovethis@comcast .netwrote in message
          news:61trfmF1vt j21U2@mid.indiv idual.net...
          >
          >I repeat: I'm not using XHTML, I'm using HTML 4.01.
          >
          http://www.velocityreviews.com/forum...-of-xhtml.html
          Man, that's just awful. Well, thanks anyway. I decided to try

          <% Response.Write( "<link rel=\"styleshee t\" type=\"text/css\"
          href=\"css/manager.css\">" );%>

          and that does the trick. Funny, I don't get the same problem with the
          META tag.

          Comment

          Working...