Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.NET inserts trailing slash in tag

Reply
Thread Tools

ASP.NET inserts trailing slash in tag

 
 
Harlan Messinger
Guest
Posts: n/a
 
      02-18-2008
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!
 
Reply With Quote
 
 
 
 
David Wier
Guest
Posts: n/a
 
      02-18-2008
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://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup


"Harlan Messinger" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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!



 
Reply With Quote
 
 
 
 
Harlan Messinger
Guest
Posts: n/a
 
      02-18-2008
David Wier wrote:
>
> "Harlan Messinger" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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.
 
Reply With Quote
 
Mark Rae [MVP]
Guest
Posts: n/a
 
      02-19-2008
"Harlan Messinger" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> I repeat: I'm not using XHTML, I'm using HTML 4.01.


http://www.velocityreviews.com/forum...-of-xhtml.html


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

 
Reply With Quote
 
Harlan Messinger
Guest
Posts: n/a
 
      02-19-2008
Mark Rae [MVP] wrote:
> "Harlan Messinger" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>> 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=\"stylesheet\" type=\"text/css\"
href=\"css/manager.css\">");%>

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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiline code - trailing slash usage abcd Python 7 03-15-2007 04:27 PM
path.py and directory naming: trailing slash automatic? metaperl.mogd@gmail.com Python 1 11-10-2006 05:03 PM
IE6 inserts forward slash at end of URL so image htm Richard Wright Computer Support 0 03-20-2005 08:13 PM
Finding out if a string has a trailing slash Stan Brown Perl Misc 6 10-29-2003 03:09 PM
trailing slash issue in Find.find Jeff Mitchell Ruby 0 08-23-2003 11:30 PM



Advertisments