<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>Manuel Abadia's ASP.NET stuff - XHTML</title>
    <link>http://www.manuelabadia.com/blog/</link>
    <description />
    <language>en-us</language>
    <copyright>Manuel Abadia</copyright>
    <lastBuildDate>Wed, 13 Aug 2008 23:12:04 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>blogcomments@manuelabadia.com</managingEditor>
    <webMaster>blogcomments@manuelabadia.com</webMaster>
    <item>
      <trackback:ping>http://www.manuelabadia.com/blog/Trackback.aspx?guid=04e66909-e2ab-4869-8a1f-ae2348bf7e47</trackback:ping>
      <pingback:server>http://www.manuelabadia.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.manuelabadia.com/blog/PermaLink,guid,04e66909-e2ab-4869-8a1f-ae2348bf7e47.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://www.manuelabadia.com/blog/CommentView,guid,04e66909-e2ab-4869-8a1f-ae2348bf7e47.aspx</wfw:comment>
      <wfw:commentRss>http://www.manuelabadia.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=04e66909-e2ab-4869-8a1f-ae2348bf7e47</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have been using <a href="http://www.thejoyofcode.com/Validator_Module.aspx">Josh
Twist’s XHTML validation module</a> for a while and I have added a couple of small
enhancements I have found useful:
</p>
        <ul>
          <li>
It works without internet access as I included the required DTDs as embedded resources.
I usually have internet access when I’m using it, but it is a big problem if I don’t. 
</li>
          <li>
It doesn’t validate ASP.NET trace output if it is present in the page. This is checked
using the trace configuration section. I have not found a way to know if trace output
is enabled in the current request. 
</li>
          <li>
I have added an attribute called showErrorsOnly to the validatorModule element to
avoid calling the Renderer.Render method if there isn’t any error. That way, if the
page validates successfully no message is shown. 
</li>
        </ul>
        <p>
 
</p>
        <p>
          <a href="http://www.manuelabadia.com/blog/content/binary/validator_bin.zip">Download
validator_binaries (42,78 KB)</a>
        </p>
        <p>
          <a href="http://www.manuelabadia.com/blog/content/binary/validator_src.zip">Downlaod
Validator_source code (44,04 KB)</a>
        </p>
        <img width="0" height="0" src="http://www.manuelabadia.com/blog/aggbug.ashx?id=04e66909-e2ab-4869-8a1f-ae2348bf7e47" />
      </body>
      <title>XHTML Validation Module Enhancement</title>
      <guid isPermaLink="false">http://www.manuelabadia.com/blog/PermaLink,guid,04e66909-e2ab-4869-8a1f-ae2348bf7e47.aspx</guid>
      <link>http://www.manuelabadia.com/blog/PermaLink,guid,04e66909-e2ab-4869-8a1f-ae2348bf7e47.aspx</link>
      <pubDate>Wed, 13 Aug 2008 23:12:04 GMT</pubDate>
      <description>&lt;p&gt;
I have been using&amp;nbsp;&lt;a href="http://www.thejoyofcode.com/Validator_Module.aspx"&gt;Josh
Twist’s XHTML validation module&lt;/a&gt; for a while and I have added a couple of small
enhancements I have found useful:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
It works without internet access as I included the required DTDs as embedded resources.
I usually have internet access when I’m using it, but it is a big problem if I don’t. 
&lt;li&gt;
It doesn’t validate ASP.NET trace output if it is present in the page. This is checked
using the trace configuration section. I have not found a way to know if trace output
is enabled in the current request. 
&lt;li&gt;
I have added an attribute called showErrorsOnly to the validatorModule element to
avoid calling the Renderer.Render method if there isn’t any error. That way, if the
page validates successfully no message is shown. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.manuelabadia.com/blog/content/binary/validator_bin.zip"&gt;Download
validator_binaries (42,78 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.manuelabadia.com/blog/content/binary/validator_src.zip"&gt;Downlaod
Validator_source code (44,04 KB)&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.manuelabadia.com/blog/aggbug.ashx?id=04e66909-e2ab-4869-8a1f-ae2348bf7e47" /&gt;</description>
      <comments>http://www.manuelabadia.com/blog/CommentView,guid,04e66909-e2ab-4869-8a1f-ae2348bf7e47.aspx</comments>
      <category>ASP.NET;XHTML</category>
    </item>
    <item>
      <trackback:ping>http://www.manuelabadia.com/blog/Trackback.aspx?guid=76d8bd97-b947-42df-8ada-f254937f15ec</trackback:ping>
      <pingback:server>http://www.manuelabadia.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.manuelabadia.com/blog/PermaLink,guid,76d8bd97-b947-42df-8ada-f254937f15ec.aspx</pingback:target>
      <dc:creator>Your DisplayName here!</dc:creator>
      <wfw:comment>http://www.manuelabadia.com/blog/CommentView,guid,76d8bd97-b947-42df-8ada-f254937f15ec.aspx</wfw:comment>
      <wfw:commentRss>http://www.manuelabadia.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=76d8bd97-b947-42df-8ada-f254937f15ec</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <title>How to fix the most annoying ASP.NET 2.0 bug (TreeView XHTML compliance)</title>
      <guid isPermaLink="false">http://www.manuelabadia.com/blog/PermaLink,guid,76d8bd97-b947-42df-8ada-f254937f15ec.aspx</guid>
      <link>http://www.manuelabadia.com/blog/PermaLink,guid,76d8bd97-b947-42df-8ada-f254937f15ec.aspx</link>
      <pubDate>Thu, 25 Oct 2007 07:38:14 GMT</pubDate>
      <description>&lt;p&gt;
Or at least, one of them.
&lt;/p&gt;
&lt;p&gt;
If you have used the TreeView control in ASP.NET and tried to validate your page against
XHTML 1.0 transitional you’ll have the unpleasant surprise to see that the TreeView
does not produce compliant code because of this:&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red163\green21\blue21;\red0\green0\blue0;\red0\green128\blue0;}??\fs20 \cf1 &amp;lt;\cf3 script\cf1 &amp;gt;\par ??\cf0 &amp;lt;!--\par ??    \cf1 function\cf0  TreeView_PopulateNodeDoCallBack(context,param) \{\par ??        WebForm_DoCallback(context.data.treeViewID,param,TreeView_ProcessNodeData,context,TreeView_ProcessNodeData,\cf1 false\cf0 );\par ??    \}\par ??\cf5 // --&amp;gt;\par ??\cf1 &amp;lt;/\cf3 script\cf1 &amp;gt;}
--&gt;
&lt;/p&gt;
&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;lt;!--
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;function&lt;/span&gt; TreeView_PopulateNodeDoCallBack(context,param)
{
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; WebForm_DoCallback(context.data.treeViewID,param,TreeView_ProcessNodeData,context,TreeView_ProcessNodeData,&lt;span style="COLOR: blue"&gt;false&lt;/span&gt;);
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: green"&gt;// --&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="COLOR: #a31515"&gt;script&lt;/span&gt;&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
The generated script code does not have the required type='text/javascript' attribute.
&lt;/p&gt;
&lt;p&gt;
It is sad that Microsoft didn’t find this bug out before releasing asp.net 2.0. They
should work with something &lt;a href="http://www.thejoyofcode.com/Validator_Module.aspx"&gt;like
this xhtml validation module &lt;/a&gt;when testing their controls. The fix for this problem
is trivial, just add the type attribute to the injected script and everybody is happy.
&lt;/p&gt;
&lt;p&gt;
However, this is one of the cases that really annoy people. For some “never to be
understood” reason, Microsoft closed this bug as “Won’t fix”. I can’t give you the
link to the bug report as Microsoft Connect is not working for the last 2 days.
&lt;/p&gt;
&lt;p&gt;
You can use the CSS Control Adapter to fix this, or use a third party TreeView. However,
that is no excuse to not having this bug fixed. I can understand that they don’t fix
bugs like the poor extensibility of the ParameterCollectionEditor as there is a lot
of work (however, even if I understand that, I think that it should be fixed. If it
is a lot of work is because of bad design. If it has been designed with extensibility
in mind things like this will not happen as often) but this trivial bug to fix has
no excuse.
&lt;/p&gt;
&lt;p&gt;
Yesterday I faced against this bug again and was too angry to be able to keep working
without doing anything about it. I used reflector to see if there was any way to fix
the bug without having to recreate the full TreeView class and I was lucky.
&lt;/p&gt;
&lt;p&gt;
The TreeView uses IsClientScriptBlockRegistered and RegisterClientScriptBlock to register
the invalid script code, so registering a valid script code before has to work, and
indeed it does:
&lt;/p&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Courier New;}}{\colortbl;??\red0\green0\blue255;\red255\green255\blue255;\red0\green0\blue0;\red128\green128\blue128;\red0\green128\blue0;\red43\green145\blue175;\red163\green21\blue21;}??\fs20 \cf1 using\cf0  System;\par ??\cf1 using\cf0  System.Web.UI;\par ??\cf1 using\cf0  System.Web.UI.WebControls;\par ??\par ??\cf1 namespace\cf0  Manu.Web.UI.WebControls\par ??\{\par ??    \cf4 ///\cf5  \cf4 &amp;lt;summary&amp;gt;\cf5 A TreeView that fixes the most annoying ASP.NET 2.0 bug ever!.\cf4 &amp;lt;/summary&amp;gt;\par ??\cf0     \cf1 public\cf0  \cf1 class\cf0  \cf6 FixedTreeView\cf0  : \cf6 TreeView\par ??\cf0     \{\par ??\cf1         #region\cf0  Fields\par ??\par ??        \cf1 protected\cf0  \cf1 static\cf0  \cf1 string\cf0  populateNodeScript = \cf7 "\\r\\n&amp;lt;script type='text/javascript'&amp;gt;\\r\\n&amp;lt;!--\\r\\n    function TreeView_PopulateNodeDoCallBack(context,param) \{\\r\\n        "\cf0 ;\par ??        \cf1 protected\cf0  \cf1 static\cf0  \cf1 string\cf0  populateNodeScriptEnd = \cf7 ";\\r\\n    \}\\r\\n// --&amp;gt;\\r\\n&amp;lt;/script&amp;gt;\\r\\n"\cf0 ;\par ??\par ??\cf1         #endregion\par ??\par ??        #region\cf0  Methods\par ??\par ??        \cf4 ///\cf5  \cf4 &amp;lt;summary&amp;gt;\cf5 Raises the \cf4 &amp;lt;see cref="E:System.Web.UI.Control.PreRender"&amp;gt;&amp;lt;/see&amp;gt;\cf5  event.\cf4 &amp;lt;/summary&amp;gt;\par ??\cf0         \cf4 ///\cf5  \cf4 &amp;lt;param name="e"&amp;gt;\cf5 An \cf4 &amp;lt;see cref="T:System.EventArgs"&amp;gt;&amp;lt;/see&amp;gt;\cf5  that contains event data.\cf4 &amp;lt;/param&amp;gt;\par ??\cf0         \cf1 protected\cf0  \cf1 override\cf0  \cf1 void\cf0  OnPreRender(\cf6 EventArgs\cf0  e)\par ??        \{\par ??            \cf6 ClientScriptManager\cf0  clientScript = Page.ClientScript;\par ??\par ??            \cf5 // register a correct script code before the TreeView\par ??\cf0             \cf1 if\cf0  (!clientScript.IsClientScriptBlockRegistered(\cf1 base\cf0 .GetType(), \cf7 "PopulateNode"\cf0 ))\par ??            \{\par ??                clientScript.RegisterClientScriptBlock(\cf1 base\cf0 .GetType(), \cf7 "PopulateNode"\cf0 , populateNodeScript + clientScript.GetCallbackEventReference(\cf7 "context.data.treeViewID"\cf0 , \cf7 "param"\cf0 , \cf7 "TreeView_ProcessNodeData"\cf0 , \cf7 "context"\cf0 , \cf7 "TreeView_ProcessNodeData"\cf0 , \cf1 false\cf0 ) + populateNodeScriptEnd);\par ??            \}\par ??\par ??            \cf5 // do the original processing\par ??\cf0             \cf1 base\cf0 .OnPreRender(e);\par ??        \}\par ??\par ??\cf1         #endregion\par ??\cf0     \}\par ??\}}
--&gt;
&lt;div style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: Courier New"&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;using&lt;/span&gt; System;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;using&lt;/span&gt; System.Web.UI;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;using&lt;/span&gt; System.Web.UI.WebControls;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;namespace&lt;/span&gt; Manu.Web.UI.WebControls
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
{
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;A
TreeView that fixes the most annoying ASP.NET 2.0 bug ever!.&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;FixedTreeView&lt;/span&gt; : &lt;span style="COLOR: #2b91af"&gt;TreeView&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #region&lt;/span&gt; Fields
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;protected&lt;/span&gt; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; populateNodeScript
= &lt;span style="COLOR: #a31515"&gt;"\r\n&amp;lt;script type='text/javascript'&amp;gt;\r\n&amp;lt;!--\r\n&amp;nbsp;&amp;nbsp;&amp;nbsp;
function TreeView_PopulateNodeDoCallBack(context,param) {\r\n&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;
"&lt;/span&gt;;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;protected&lt;/span&gt; &lt;span style="COLOR: blue"&gt;static&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; populateNodeScriptEnd
= &lt;span style="COLOR: #a31515"&gt;";\r\n&amp;nbsp;&amp;nbsp;&amp;nbsp; }\r\n// --&amp;gt;\r\n&amp;lt;/script&amp;gt;\r\n"&lt;/span&gt;;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #region&lt;/span&gt; Methods
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;Raises
the &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&lt;font color=#008000&gt;PreRender&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt; event.&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: gray"&gt;///&lt;/span&gt;&lt;span style="COLOR: green"&gt; &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;param
name="e"&amp;gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt;An &lt;/span&gt;&lt;span style="COLOR: gray"&gt;&lt;font color=#008000&gt;System.EventArgs&lt;/font&gt;&lt;/span&gt;&lt;span style="COLOR: green"&gt; that
contains event data.&lt;/span&gt;&lt;span style="COLOR: gray"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;protected&lt;/span&gt; &lt;span style="COLOR: blue"&gt;override&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; OnPreRender(&lt;span style="COLOR: #2b91af"&gt;EventArgs&lt;/span&gt; e)
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: #2b91af"&gt;ClientScriptManager&lt;/span&gt; clientScript
= Page.ClientScript;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//
register a correct script code before the TreeView&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (!clientScript.IsClientScriptBlockRegistered(&lt;span style="COLOR: blue"&gt;base&lt;/span&gt;.GetType(), &lt;span style="COLOR: #a31515"&gt;"PopulateNode"&lt;/span&gt;))
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; clientScript.RegisterClientScriptBlock(&lt;span style="COLOR: blue"&gt;base&lt;/span&gt;.GetType(), &lt;span style="COLOR: #a31515"&gt;"PopulateNode"&lt;/span&gt;,
populateNodeScript + clientScript.GetCallbackEventReference(&lt;span style="COLOR: #a31515"&gt;"context.data.treeViewID"&lt;/span&gt;, &lt;span style="COLOR: #a31515"&gt;"param"&lt;/span&gt;, &lt;span style="COLOR: #a31515"&gt;"TreeView_ProcessNodeData"&lt;/span&gt;, &lt;span style="COLOR: #a31515"&gt;"context"&lt;/span&gt;, &lt;span style="COLOR: #a31515"&gt;"TreeView_ProcessNodeData"&lt;/span&gt;, &lt;span style="COLOR: blue"&gt;false&lt;/span&gt;)
+ populateNodeScriptEnd);
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: green"&gt;//
do the original processing&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="COLOR: blue"&gt;base&lt;/span&gt;.OnPreRender(e);
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&lt;span style="COLOR: blue"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion&lt;/span&gt;
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/p&gt;
&lt;p style="MARGIN: 0px"&gt;
}
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;p&gt;
It is sad to have to resort to this even in the next ASP.NET version. Hopefully&amp;nbsp;a
Microsoft guy can fix this in time for the next ASP.NET version.
&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;
&amp;nbsp;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.manuelabadia.com/blog/aggbug.ashx?id=76d8bd97-b947-42df-8ada-f254937f15ec" /&gt;</description>
      <comments>http://www.manuelabadia.com/blog/CommentView,guid,76d8bd97-b947-42df-8ada-f254937f15ec.aspx</comments>
      <category>ASP.NET;XHTML</category>
    </item>
  </channel>
</rss>