473,399 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Html 4.01 strict instead of xhtml?

Can I stop asp.net from applying self closing tags? I am trying to generate
an html 4.01 strict page rather than an xhtml page and the w3 validator is
unhappy about asp.net automatically translating this:

<link rel="stylesheet" href="SkinStyle.aspx?SkinName=Test" type="text/css">

to this:

<link rel="stylesheet" href="SkinStyle.aspx?SkinName=Test" type="text/css"
/>
Aug 7 '07 #1
4 1972
Hi Andy,

Regarding on the ASP.NET/VS IDE html formatting question you mentioned
they're actually controlled by the HTML Designer's formatting and
validation setting. You can configure them through the following approaches:

For the automatically close tag behavior, you can set it through the below
steps:

**open "tools ---options" menu,

** in the opened dialog, choose the following path in left view:

Text Editor-->HTML-->Format-->

and you'll find the "Auto Insert close Tag" check option

for the design-time validation(against html), you can also find the
following setting:

Text Editor-->HTML-->Validation ---"Target:"

you can choose "HTML 4.01" as your ASPX page's target validation
schema(instead of xhtml 1.0)

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Aug 7 '07 #2
Steven Cheng[MSFT] wrote:
Hi Andy,

Regarding on the ASP.NET/VS IDE html formatting question you mentioned
they're actually controlled by the HTML Designer's formatting and
validation setting. You can configure them through the following
approaches:

For the automatically close tag behavior, you can set it through the
below steps:

**open "tools ---options" menu,

** in the opened dialog, choose the following path in left view:

Text Editor-->HTML-->Format-->

and you'll find the "Auto Insert close Tag" check option
Hi, thanks for your help! I just tried this but it didn't make a difference.
The tag doesn't have self closing tags in the designer, only in the
outputted html.
Aug 7 '07 #3
Steven Cheng[MSFT] wrote:
So far I think one way to overcome this behavior would be manually
customize the ASP.NET page's response output through a Response Filter
stream. You can attach a Filter for each Page's Response and modify
the response content. Here is a web article demonstrate using
response Filter to customize(format) page output:

http://aspnetresources.com/articles/HttpFilters.aspx
Producing XHTML-Compliant Pages With Response Filters

For your scenario, you may use it to change all the "/>" close tag to
">".
Perfect, thank you!
Aug 8 '07 #4
You're welcome :)

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Aug 8 '07 #5

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

Similar topics

50
by: Christopher Benson-Manica | last post by:
(if this isn't the place for XHTML, I'd appreciate a redirect) According to the w3's web site, some non-HTML 4 browsers won't properly interpret non-minimized boolean attributes, i.e. <option...
32
by: Werner Partner | last post by:
I put this question already, but erhaps it "came under the wheels" because it was hidden in another thread. Nevertheless it's important for me to understand the problem and solve it. Old html...
29
by: Armand Karlsen | last post by:
I have a website ( http://www.zen62775.zen.co.uk ) that I made HTML 4.01 Transitional and CSS compliant, and I'm thinking of converting it into XHTML to learn a little about it. Which XHTML variant...
4
by: Arthur Dent | last post by:
Hello all, ive been programming with ASP.NET since it came out, but am just getting my feet with now with v.2. Ive noticed something strange in the way my HTML tables get rendered with 2. I use...
5
by: Rob Roberts | last post by:
Is there any way to change VS2005 to generate HTML 4.01/Strict instead of XHTML 1.0/Transititional? VS2005 puts a DOCTYPE statement specifying XHTML 1.0/Transitional at the top of every new aspx...
20
by: Alan Silver | last post by:
Hello, I have read about the problems that IE has when using a doctype of HTML 4.01 Transitional. I was advised to use Strict wherever possible. My question is, does the same apply to XHTML...
29
by: VK | last post by:
Someone in W3C just cannot accept the idea of so much time (your own and everyone else) wasted for nothing (for XHTML to be exact). So instead of concentrating on something useful instead they...
2
by: PapaRandy | last post by:
Hello, I am trying to validate the following .py webpage as HTML (through W3C). I put: ----------------------------------------------------------------------------- print "Content-type:...
21
by: =?iso-8859-2?Q?K=F8i=B9tof_=AEelechovski?= | last post by:
It is common knowledge that XHTML is better HTML and you can serve XHTML content as HTML. However, the second statement is incorrect, for various reasons; it is enough to say that the HTML...
6
by: Guy Macon | last post by:
cwdjrxyz wrote: HTML 5 has solved the above probem. See the following web page: HTML 5, one vocabulary, two serializations http://www.w3.org/QA/2008/01/html5-is-html-and-xml.html
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.