Hi Andy,
Thanks for your reply and the further clarify.
Actually, I originally assume that you just want to change the edit
experience in IDE at design-time. So you also want the runtime html output
be formated without close tag ( "/>"), right?
I've performed some further test, actually, ASP.NET 2.0 runtime can let you
specify the "xhtmlConformance" to a "Legacy" value so that the output will
conform to ASP.NET 1.1 format, e.g.
===========
............
<xhtmlConformance mode="Legacy"/>
</system.web>
============
However, when running the aspx page, such as below:
============
<html >
<head runat="server">
<link rel="stylesheet" href="SkinStyle.aspx?SkinName=Test" type="text/css">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="button" >
</div>
</form>
</body>
</html>
==============
the <input type="button" > can be keep without close tag, the <link ....>
will be formated to <link .... />. It seems the runtime engine will
transalte the tags in <head> section and ensure closing tag and there
hasn't any declarative means to configure this.
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 ">".
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.