473,661 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "xhtmlConforman ce"
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_Popula teNodeDoCallBac k(context,param ) {
WebForm_DoCallb ack(context.dat a.treeViewID,pa ram,TreeView_Pr ocess
NodeData,contex t,TreeView_Proc essNodeData,fal se);
}
// -->
</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 1216
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**********@n ospamforme.comw rote in message
news:12******** *****@corp.supe rnews.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 "xhtmlConforman ce"
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_Popula teNodeDoCallBac k(context,param ) {
WebForm_DoCallb ack(context.dat a.treeViewID,pa ram,TreeView_Pr ocess
NodeData,contex t,TreeView_Proc essNodeData,fal se);
}
// -->
</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**********@n ospamforme.comw rote in message
news:12******** *****@corp.supe rnews.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 "xhtmlConforman ce"
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_Popula teNodeDoCallBac k(context,param ) {
WebForm_DoCallb ack(context.dat a.treeViewID,pa ram,TreeView_Pr ocess
NodeData,contex t,TreeView_Proc essNodeData,fal se);
}
// -->
</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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1608
by: menon | last post by:
We have developed a asp.net application using Microsoft TreeView control. On the production machine the application works fine but when the same application is diployed on a server with windows2003 the treeview is not being displayed. Please let me know how to enable the treeview control on the remote pc OR how to deploy microsoft treeview control on a remote pc. thanks Menon
14
6816
by: Evan Kontos | last post by:
I am trying to implement a Treeview w/an XML file and I even copied and pasted examples from MSDN but can't get them to work. Any suggestions welcome. XML File <TREENODES> <TREENODE TEXT="Document-1"> <TREENODE TEXT="Folder-1" EXPANDED="true"> <TREENODE TEXT="Document-2" />
5
2224
by: lanem | last post by:
I want to display some drill-down data with a datagrid look. I can get the exact functionality I want with a treeview, but I don't like the way the treeview looks and formats the data. I want a multi-column table look like a datagrid. It is not as easy as just hardcoding a datagrid within a datagrid because the data may do down pretty deep. The treeview works great for this. Is there a way to make the treeview look kind of like a...
1
2675
by: Alex D. | last post by:
hey guys I found what is causing the problems with my treeview in Firefox...the answer is: treeview+dropdwonlist in the same page dont work! try this simple code and see for yourselves. you can do it using the IDE, just add a treeview and some nodes and add a dropdownlist..then see if your treeview + and - images switches and also check if your treeview collapsed/expanded information is maintained between postbacks! <%@ Page...
4
1280
by: Alan Silver | last post by:
Hello, I have a site that produces 100% valid XHTML 1.0 Strict when viewed in a browser (IE, Firefox, etc). I just tried validating the site with an on-line validator, and got several errors. It seems that the framework is sending the validator down-level code, as it assumes that the validator is a down-level browser. Is there any way to stop this? At the moment, anyone checking it (which
0
6742
by: celoftis | last post by:
Using VS2005, VB code behind, BACKGROUND I'm trying to set up a page with a TreeView of links on the left hand side of my page - when clicked I want the links to open in the remaining portion of the page. The best and easiest way I've found todo this is with using frames (any suggestions on other ways todo this I'd love to hear about it). PROBLEM
3
4065
by: =?Utf-8?B?TGVzbGll?= | last post by:
Using Visual Studio 2005 SP1 I am attempting to dynamically load a treeview control. I create an XmlDataSource and then load the data source using XmlDataSource.Data. I Load my XML string into this property using the code shown below. However if I change the values in the XML string that I am loading into XmlDataSource.Data and then run the web, the changes do not show up. The only way to get the changes to show up is to rebuild the...
1
1267
by: Chris | last post by:
I know this has been posted before but I can't find anyone with a solution, I was wondering whether any one has a solution/workaround yet for the treeview XHTML "bug". The treeview produces invalid XHTML. It produces a javascript function TreeView_PopulateNodeDoCallBack with no type. Any ideas. Regards, Chris.
3
4700
by: dutsnekcirf | last post by:
I have a treeview control on a custom task pane in Excel. I've enable the ability to use Drag & Drop (by following this how-to) on the treeview to change the order of the nodes. The problem though is if I close the application and then go back in, the nodes are back in the order they were before I had reordered them. Is there a way that I can modify my DragDrop event to permanently change the index of the nodes? Here's my code if you're...
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8341
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8754
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8542
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6181
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5650
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4343
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.