Groups | Blog | Home
all groups > asp.net > february 2006 >

asp.net : How to get valid XHTML from the framework????


Alan Silver
2/9/2006 8:54:59 PM
Hello,

I thought that ASP.NET 2.0 was supposed to output valid XHTML 1.0. I've
just spent a very frustrating time trying to fix all the validation
errors in framework-produced code.

I posted previously (but haven't had any replies yet) about the
framework adding a "name" attribute to the form, even though this
doesn't exist in XHTML 1.0.

I've now discovered that when you use a treeview, it adds the
following...

<script>
<!--
function TreeView_PopulateNodeDoCallBack(context,param) {
WebForm_DoCallback(context.data.treeViewID,param,TreeView_Process
NodeData,context,TreeView_ProcessNodeData,false);
}
// -->
</script>

which is invalid as the <script> tag needs a "type" attribute.

Anyone know if there's a way of getting it to produce valid XHTML? I've
hardly started, and I've already found quite a few validation issues.

--
Alan Silver
DWS
2/9/2006 9:18:27 PM
Alan,
Thank you for making the internet a more useable place for the <1% that need
XHTML conformance today.

Sincerely
DWS





[quoted text, click to view]
Joerg Jooss
2/10/2006 12:00:00 AM
Thus wrote DWS,

[quoted text, click to view]

There are rules and regulations in certain countries that stipulate the use
of valid XHTML, e.g. to allow for accessibility technologies like screen
readers. You probably don't care, but you're customer may do...

Cheers,
--
Joerg Jooss
news-reply@joergjooss.de

Bruce Barker
2/10/2006 9:07:03 AM
type is not required. you can supply a meta tag default the script type.

<META http-equiv="Content-Script-Type" content="text/javascript">


-- bruce (sqlwork.com)


[quoted text, click to view]

Peter Blum
2/10/2006 1:03:34 PM
Hi Alan,

I have found a few XHTML bugs too. As a custom control developer, I don't
have any choice but to try to get 100% compliance of my web controls.

I've used the Microsoft bug reporting system to notify them about bugs. Its
essential that you do the same.

You can get to it here:
http://lab.msdn.microsoft.com/ProductFeedback/default.aspx

--- Peter Blum
www.PeterBlum.com
Email: PLBlum@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

[quoted text, click to view]

Alan Silver
2/13/2006 2:26:40 PM
In article <453FBF24-8B85-4C93-A604-D3F1AC8B6F86@microsoft.com>, DWS
<DWS@discussions.microsoft.com> writes
[quoted text, click to view]

What was the point of this comment? If you don't have anything sensible
to say, please don't bother.

[quoted text, click to view]

--
Alan Silver
Alan Silver
2/13/2006 2:27:44 PM
In article <OkB9qRmLGHA.2624@TK2MSFTNGP12.phx.gbl>, Bruce Barker
<brubar_nospamplease_@safeco.com> writes
[quoted text, click to view]

Thanks, but this didn't help. The script tag itself still needs a type
attribute for validity.

Any other ideas? Other than not using the treeview altogether!! Thanks.

[quoted text, click to view]

--
Alan Silver
Alan Silver
2/13/2006 2:28:48 PM
In article <uUOTUwmLGHA.3100@tk2msftngp13.phx.gbl>, Peter Blum
<PLBlum@Blum.info> writes
[quoted text, click to view]

Thanks. Have you had any success using this? I submitted a couple of
(admittedly minor) bug reports using this, and there hasn't been the
slightest hint of anyone taking any notice of them.

Ta ra

[quoted text, click to view]

--
Alan Silver
Alan Silver
2/13/2006 2:44:40 PM
In article <uUOTUwmLGHA.3100@tk2msftngp13.phx.gbl>, Peter Blum
<PLBlum@Blum.info> writes
[quoted text, click to view]

Have you ever seen a "name" attribute added to the form? I am having
this problem at the moment and can't see how to fix it.

My server side code is...

<form id="Form1" runat="server">

....and the resulting output looks like...

<form name="aspnetForm" method="post" action="Default.aspx"
id="aspnetForm">

Ever seen this? It's stopping my pages from validating. Any suggestions
as to how to avoid it would be very welcome.

--
Alan Silver
AddThis Social Bookmark Button