Treeview producing invalid XHTML in ASP 2.0

D

Debbie Croft

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,TreeView_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...
 
D

Debbie Croft

FYI. Installing Mircosoft's CSS Friendly Control Adaptors solves this
problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top