473,491 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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!
Feb 18 '08 #1
4 1703
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" <hm*******************@comcast.netwrote in message
news:61*************@mid.individual.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!

Feb 18 '08 #2
David Wier wrote:
>
"Harlan Messinger" <hm*******************@comcast.netwrote in message
news:61*************@mid.individual.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.
Feb 18 '08 #3
"Harlan Messinger" <hm*******************@comcast.netwrote in message
news:61*************@mid.individual.net...
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

Feb 19 '08 #4
Mark Rae [MVP] wrote:
"Harlan Messinger" <hm*******************@comcast.netwrote in message
news:61*************@mid.individual.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=\"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.
Feb 19 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2513
by: Xaradas | last post by:
Someone could tell me why preg_replace eat a slash when it do replacement? <? $stringToReplace = "blah blah {nome} blah blah"; $replacement = "Two slash: \\\\"; $stringToReplace =...
7
1667
by: steve | last post by:
Anyone knows a good script that basically delivers functionality similar to slash dot? I use phpnuke, but am thinking if there is something better out there written in php. -- Posted using the...
30
74811
by: Stephen Ferg | last post by:
I have a question that is not directly Python-related. But I thought I'd ask the most erudite group that I know... :-) When did Windows start accepting the forward slash as a path separator...
1
1477
by: Victor Porton | last post by:
Should we end namespace names (http:// URLs) with a slash or not? Arguments?
23
3682
by: Hostile17 | last post by:
I keep coming across people, online and in real life, who believe that to code single tags like <br> and <img> with trailing slashes, <br /> and <img /> is considered "best practice" and when...
1
2520
by: metaperl.mogd | last post by:
Hi, I'm a big fan of path.py. One thing that I think is a good idea is for directories to automatically have a slash appended to them if it is not automatically added. Eg: from path import...
2
2848
by: Tom | last post by:
I've beat my head every way I can think of against this wall. Maybe someone here just knows the answer. I'm testing an upload class on my laptop WAMP server. When I run the test script,...
7
2945
by: abcd | last post by:
When do I need to use a trailing slash to separate code over multiple lines. For example: x = "hello world, this is my multiline " + \ "string!!!!" x = {'name' : \ 'bob'}
5
2934
by: brian.j.parker | last post by:
Hey all, I've noticed an obscure little quirk: it appears that if you use a login with trailing spaces on the name, SYSTEM_USER automatically trims those trailing spaces in SQL Server 2000, but not...
0
7115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4881
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3086
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.