468,250 Members | 1,619 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,250 developers. It's quick & easy.

Treeview producing invalid XHTML in ASP 2.0

I have a client who mandates XHTML compliance in the applications they
commission. Problem is that I've just found that the Treeview control
doesn't produce valid XHTML - even with the appropriate "xhtmlConformance"
settings.

The problem lies in the post back code. As you can see below, the <script>
tag is missing a 'type="text/javascript"' attribute - which is required in
XHTML.

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

The Microsoft documentation says the Treeview is supposed to produce valid
XHTML - so it's broken. Anyone managed to create a work around? If there's
nothing easy I can do, would it be possible to intercept the HTML output by
the Treeview (or even the page) and insert the attribute using a string
replace, or something.

Failing a solution for Treeview, is there a good (and easy) third-party
alternative to Treeview that is known to produce valid XHTML?

What a pain. The reason I moved to ASP.NET 2.0 was because they said they'd
fixed this stuff. Grrr...
Nov 19 '06 #1
2 1102
Hi,

this has been reported:
https://connect.microsoft.com/Visual...edbackID=94108

Unfortunately they've decided not to fix it immediately. So most likely will
get fixed in vNext

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"Debbie Croft" <de**********@nospamforme.comwrote in message
news:12*************@corp.supernews.com...
>I have a client who mandates XHTML compliance in the applications they
commission. Problem is that I've just found that the Treeview control
doesn't produce valid XHTML - even with the appropriate "xhtmlConformance"
settings.

The problem lies in the post back code. As you can see below, the <script>
tag is missing a 'type="text/javascript"' attribute - which is required in
XHTML.

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

The Microsoft documentation says the Treeview is supposed to produce valid
XHTML - so it's broken. Anyone managed to create a work around? If there's
nothing easy I can do, would it be possible to intercept the HTML output
by the Treeview (or even the page) and insert the attribute using a string
replace, or something.

Failing a solution for Treeview, is there a good (and easy) third-party
alternative to Treeview that is known to produce valid XHTML?

What a pain. The reason I moved to ASP.NET 2.0 was because they said
they'd fixed this stuff. Grrr...

Nov 19 '06 #2
FYI. Installing Mircosoft's CSS Friendly Control Adaptors solves this
problem.

"Debbie Croft" <de**********@nospamforme.comwrote in message
news:12*************@corp.supernews.com...
>I have a client who mandates XHTML compliance in the applications they
commission. Problem is that I've just found that the Treeview control
doesn't produce valid XHTML - even with the appropriate "xhtmlConformance"
settings.

The problem lies in the post back code. As you can see below, the <script>
tag is missing a 'type="text/javascript"' attribute - which is required in
XHTML.

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

The Microsoft documentation says the Treeview is supposed to produce valid
XHTML - so it's broken. Anyone managed to create a work around? If there's
nothing easy I can do, would it be possible to intercept the HTML output
by the Treeview (or even the page) and insert the attribute using a string
replace, or something.

Failing a solution for Treeview, is there a good (and easy) third-party
alternative to Treeview that is known to produce valid XHTML?

What a pain. The reason I moved to ASP.NET 2.0 was because they said
they'd fixed this stuff. Grrr...

Dec 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by menon | last post: by
14 posts views Thread by Evan Kontos | last post: by
5 posts views Thread by lanem | last post: by
1 post views Thread by Alex D. | last post: by
reply views Thread by celoftis | last post: by
3 posts views Thread by =?Utf-8?B?TGVzbGll?= | last post: by
1 post views Thread by Chris | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.