<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 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:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Errors and Bugs</title>
        <link>http://www.kowitz.net/category/13.aspx</link>
        <description>Errors and Bugs</description>
        <language>en-AU</language>
        <copyright>Brendan Kowitz</copyright>
        <managingEditor>brendan@kowitz.net</managingEditor>
        <generator>Subtext Version 2.0.0.43</generator>
        <item>
            <title>Upgrading to subtext 2.0-fail</title>
            <link>http://kowitz.net/archive/2008/08/15/upgrading-to-subtext-2.0-fail.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;It's been a long time in between &lt;a href="https://sourceforge.net/project/showfiles.php?group_id=137896"&gt;updates&lt;/a&gt; for &lt;a href="http://subtextproject.com/"&gt;subtext&lt;/a&gt;, but, has it actually been worth it? Well, kinda. Compared to the 1.9.5 release this one seems a little rough around the edges.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;If you're on a shared host WITHOUT full trust, beware! Things will break in multiple places, including:&lt;/font&gt;&lt;/p&gt;
&lt;font face="Arial"&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;strike&gt;DTP.aspx (The homepage) (tag "st" undefined, needed to add back 'Register TagPrefix="st" Namespace="Subtext.Web.UI.WebControls"')&lt;/strike&gt; (My web.config merge error)&lt;/li&gt;
    &lt;li&gt;/admin/Posts/  (EnclosureMimetypes config section missing requirePermission="false" attribute) &lt;/li&gt;
    &lt;li&gt;/admin/Feedback/ ("FeedbackStatusFlag" undeclared, needed to prefix with the namespace) &lt;/li&gt;
    &lt;li&gt;Subtext.Framework.UrlManager.UrlReWriteHandlerFactory.GetHandlerForUrl(string url) also breaks from a security permission when calling UrlAuthorizationModule.CheckUrlAccessForPrincipal(), had to recompile Subtext.Framework to get around this. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; I don't mean to blast subtext, but I might as well lay a few more issues out there:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;The call to "&lt;font face="Arial"&gt;/Admin/Services/Ajax/AjaxServices.ashx?proxy" throws an "&lt;font face="Arial"&gt;Operation could destabilize the runtime" exception, haha I must say this is the first time I've seen that, fixed by generating the &lt;font face="Arial"&gt;AjaxServicesProxy.js file locally.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;/li&gt;
    &lt;li&gt;In the Feedback admin area, when hovering the URL icon the "title" tag shows the email address. &lt;/li&gt;
    &lt;li&gt;Forgot to add this last night: Had to remove the OpenID stuff from the login page, errors with "Cannot be called from Untrusted assembly". &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The problems in this upgrade mostly appear to be stemming from carelessness regarding restrictions in medium trust. I guess the question is - "Is subtext venturing away from medium trust on purpose?"&lt;/p&gt;
&lt;p&gt;Looking to the future. From what I recall I don’t think it’s actually possible to run .net 3.5 applications without full trust, features such as anonymous types simply don’t work.&lt;br /&gt;
&lt;/p&gt;
&lt;/font&gt;&lt;img src="http://kowitz.net/aggbug/89.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Brendan Kowitz</dc:creator>
            <guid>http://kowitz.net/archive/2008/08/15/upgrading-to-subtext-2.0-fail.aspx</guid>
            <pubDate>Fri, 15 Aug 2008 13:55:40 GMT</pubDate>
            <wfw:comment>http://kowitz.net/comments/89.aspx</wfw:comment>
            <comments>http://kowitz.net/archive/2008/08/15/upgrading-to-subtext-2.0-fail.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://kowitz.net/comments/commentRss/89.aspx</wfw:commentRss>
            <trackback:ping>http://kowitz.net/services/trackbacks/89.aspx</trackback:ping>
        </item>
        <item>
            <title>ERROR: 42601: a column definition list is only allowed for functions returning record</title>
            <link>http://kowitz.net/archive/2007/03/15/error-42601-a-column-definition-list-is-only-allowed-for.aspx</link>
            <description>&lt;p&gt;Since the postgres forums appear to be a little quite, I'll post my error here as well. &lt;/p&gt;
&lt;p&gt;This error is in regards to the postgres .net npgsql driver and seemed to only occur when using stored procs.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;The Error&lt;/strong&gt;&lt;br /&gt;
The behavior I experienced happens when using stored procedures started out with me getting the following error:&lt;br /&gt;
&lt;strong&gt;ERROR: 42601: a column definition list is only allowed for functions returning "record"&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
After checking and double checking the stored proc and the parameters I was sending in I turned Npgsql's debugging on. The error appears to be coming from a statement that looks like the following:&lt;br /&gt;
select * from sitemenus_ins(68::int4,34::int4) as (psitemenuid int4, prowstamp timestamp )&lt;br /&gt;
This line of sql fails. &lt;/p&gt;
&lt;p&gt;However the following will work:&lt;br /&gt;
select * from sitemenus_ins(68::int4,34::int4)&lt;br /&gt;
The only difference being that the second one has the 'as(...' clause taken off.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Strange Observation:&lt;/strong&gt;&lt;br /&gt;
The snippet in question is executed automatically by the provider after the NpgsqlCommand.cs class does some other queries to try and match the list of the parameters that are in the stored procedure it is about to execute. However, the 'select' it uses to determine if it should append the 'as(..' clause is queried from the pg_proc table but is matched on the parameter types that are passed in, and not on those of the actual proc.&lt;br /&gt;
&lt;br /&gt;
For example, this means that if I passed in say a 'Text' type (25) as opposed to the defined datatype on a proc (eg. 'Varchar' 1043) The select will fail and the extra 'as (...' on the end of the statement in question will not be appended. So the function call will work&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Resolution:&lt;/strong&gt;&lt;br /&gt;
I have no idea what the ideal solution is, I don't have a firm understanding of the ins and outs of the provider, but after downloading the source and removing the check so the 'as (...' never gets appended, all CRUD operations in my unit tests pass.&lt;/p&gt;
&lt;p&gt;Another suggestion by Al is that maybe it is a piece of code left in there that was needed from a previous version of postgres (since the code has been around for a few years now).  Whatever the reason, it causes errors, I've checked the source for &lt;a target="_blank" href="http://sourceforge.net/projects/pgsqlclient"&gt;another &lt;/a&gt;postgres provider and it doesn't attempt to do the append.  The only concern I have if this is an actual bug is that it looks as though the same code has been copied into the branch for the &lt;a href="http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/npgsql/Npgsql2/"&gt;npgsql2&lt;/a&gt; provider, so those wanting to use stored procs on postgres in the future may find the same error I have.&lt;/p&gt;&lt;img src="http://kowitz.net/aggbug/70.aspx" width="1" height="1" /&gt;</description>
            <guid>http://kowitz.net/archive/2007/03/15/error-42601-a-column-definition-list-is-only-allowed-for.aspx</guid>
            <pubDate>Thu, 15 Mar 2007 11:30:35 GMT</pubDate>
            <wfw:comment>http://kowitz.net/comments/70.aspx</wfw:comment>
            <comments>http://kowitz.net/archive/2007/03/15/error-42601-a-column-definition-list-is-only-allowed-for.aspx#feedback</comments>
            <wfw:commentRss>http://kowitz.net/comments/commentRss/70.aspx</wfw:commentRss>
            <trackback:ping>http://kowitz.net/services/trackbacks/70.aspx</trackback:ping>
        </item>
        <item>
            <title>ASP.NET 2.0 Mozilla Browser Detection Hole</title>
            <link>http://kowitz.net/archive/2006/12/11/asp.net-2.0-mozilla-browser-detection-hole.aspx</link>
            <description>&lt;p&gt;It has recently come to my attention that there is something drastically wrong with the way search engines have been indexing my ASP.NET 2.0 blog.&lt;/p&gt;
&lt;p&gt;As I've started to &lt;a href="http://www.kowitz.net/2006/12/7/Cleaning+Up+ASPNET+Sessions+in+Google.aspx"&gt;explain previously&lt;/a&gt;, this is because of the way the browser detection is set up. To give a brief rundown ASP.NET 2.0 has a default &lt;a href="http://msdn2.microsoft.com/en-us/library/ms228122(VS.80).aspx"&gt;browser definition&lt;/a&gt; which seems to assume that the default browser is fairly capable and supports common things such as javascript and cookies. A browser definition can get inherited into other definitions which can then override specific properties to update it for that specific browser or browser version.&lt;/p&gt;
&lt;p&gt;Apparently in around &lt;a href="http://www.mattcutts.com/blog/q-a-thread-march-27-2006/"&gt;March 2006&lt;/a&gt; Google started rolling out updates that changed the Googlebot's useragent string from:&lt;/p&gt;
&lt;p&gt;"Googlebot/2.1 (+http://www.googlebot.com/bot.html)" to&lt;br /&gt;
"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"&lt;/p&gt;
&lt;p&gt;Now the reason for this is so the Googlebot could identify itself as being Mozilla/5.0 compliant which should allow it to be accepted by more webservers. However this breaks the detection pattern in ASP.NET. (And was always broken in Yahoo Slurp, I just don't know if anyone ever noticed).&lt;/p&gt;
&lt;p&gt;When the useragent was just "Googlebot/2.1" it wasn't able to be matched and used the "default.browser" detection file which defaulted to a browser of reasonable capabilities. After the change it found itself in the "mozilla.browser" file because it was detected on the "Mozilla" word. So all the following sets of instructions in the "mozilla.browser" file try to establish exactly what platform and variant of Mozilla it is, for example, if its Firefox running on OSX, or if it's the older Mozilla Gecko rendering engine. But because there is no definition for a Generic Mozilla/5.0 compatible browser it gets the most relevant match, being the lowest Mozilla/1.0 compatible settings. Bad!&lt;/p&gt;
&lt;p&gt;Because of this bad detection the default Mozilla/1.0 settings assume NO COOKIES and insert the session ID into the url then issues a response status 302 (content temporarily moved). What makes this situation even worse is that the default behavior of search engines is to &lt;a href="http://www.mattcutts.com/blog/seo-advice-discussing-302-redirects/"&gt;follow these redirects&lt;/a&gt; and index the content on the other side. So basically everytime some random User-agent that claims to be Mozilla/5.0 compliant hits the site it gets Mozilla/1.0 capabilities. What is needed is something to bridge this gap.&lt;/p&gt;
&lt;p&gt;Fortunately there is something that can be done that won't even require a recompile of your ASP.NET 2.0 application. Simply create a "genericmozilla5.browser" file in your "/App_Browsers" folder in the root of your application with the following in contents:&lt;/p&gt;
&lt;pre class="xml" name="code"&gt;&amp;lt;browsers&amp;gt;
&amp;lt;browser id="GenericMozilla5" parentID="Mozilla"&amp;gt;
&amp;lt;identification&amp;gt;
&amp;lt;userAgent match="Mozilla/5\.(?'minor'\d+).*[C|c]ompatible; ?(?'browser'.+); ?\+?(http://.+)\)" /&amp;gt;
&amp;lt;/identification&amp;gt;
&amp;lt;capabilities&amp;gt;
&amp;lt;capability name="majorversion" value="5" /&amp;gt;
&amp;lt;capability name="minorversion" value="${minor}" /&amp;gt;
&amp;lt;capability name="browser" value="${browser}" /&amp;gt;
&amp;lt;capability name="Version" value="5.${minor}" /&amp;gt;
&amp;lt;capability name="activexcontrols" value="true" /&amp;gt;
&amp;lt;capability name="backgroundsounds" value="true" /&amp;gt;
&amp;lt;capability name="cookies" value="true" /&amp;gt;
&amp;lt;capability name="css1" value="true" /&amp;gt;
&amp;lt;capability name="css2" value="true" /&amp;gt;
&amp;lt;capability name="ecmascriptversion" value="1.2" /&amp;gt;
&amp;lt;capability name="frames" value="true" /&amp;gt;
&amp;lt;capability name="javaapplets" value="true" /&amp;gt;
&amp;lt;capability name="javascript" value="true" /&amp;gt;
&amp;lt;capability name="jscriptversion" value="5.0" /&amp;gt;
&amp;lt;capability name="supportsCallback" value="true" /&amp;gt;
&amp;lt;capability name="supportsFileUpload" value="true" /&amp;gt;
&amp;lt;capability name="supportsMultilineTextBoxDisplay" value="true" /&amp;gt;
&amp;lt;capability name="supportsMaintainScrollPositionOnPostback" value="true" /&amp;gt;
&amp;lt;capability name="supportsVCard" value="true" /&amp;gt;
&amp;lt;capability name="supportsXmlHttp" value="true" /&amp;gt;
&amp;lt;capability name="tables" value="true" /&amp;gt;
&amp;lt;capability name="vbscript" value="true" /&amp;gt;
&amp;lt;capability name="w3cdomversion" value="1.0" /&amp;gt;
&amp;lt;capability name="xml" value="true" /&amp;gt;
&amp;lt;capability name="tagwriter" value="System.Web.UI.HtmlTextWriter" /&amp;gt;
&amp;lt;/capabilities&amp;gt;
&amp;lt;/browser&amp;gt;
&amp;lt;/browsers&amp;gt;
&lt;/pre&gt;
&lt;p&gt;This will match generic Mozilla compatible browsers and spiders with user-agents strings such as:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) &lt;/li&gt;
    &lt;li&gt;Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp) &lt;/li&gt;
    &lt;li&gt;Mozilla/5.0 (compatible; AbiLogicBot/1.0; +http://www.abilogic.com/bot.html) &lt;/li&gt;
    &lt;li&gt;Mozilla/5.0 (compatible; AnyApexBot/1.0; +http://www.anyapex.com/bot.html) &lt;/li&gt;
    &lt;li&gt;Mozilla/5.0 (compatible; BecomeBot/3.0; MSIE 6.0 compatible; +http://www.become.com/site_owners.html) &lt;/li&gt;
    &lt;li&gt;Mozilla/5.0 (compatible; MojeekBot/2.0; http://www.mojeek.com/bot.html) &lt;/li&gt;
    &lt;li&gt;Mozilla/5.0 (compatible; Scrubby/2.2; +http://www.scrubtheweb.com/) &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Other Notes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The MSNBOT also never had this problem because it like the original Googlebot string was never detected and thus received the "default.browser" file settings which support the cookies.&lt;/p&gt;
My solution is not a complete fix, I think Microsoft could have done one thing better here. Because the browser string goes into the "mozilla.browser" file, they need another level where when it knows its Mozilla/5.0 compliant it gets the appropriate defaults before it starts to figure out exactly what browser it is. Even though with this approach the exact browsing useragent wouldn't be established, it would at least support future browsers claiming to be compliant at a higher level then just "Mozilla".
&lt;p&gt;&lt;strong&gt;Downloads&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://www.kowitz.net/files/genericmozilla5.zip"&gt;genericmozilla5.browser&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt; &lt;/pre&gt;
&lt;pre&gt; &lt;/pre&gt;&lt;img src="http://kowitz.net/aggbug/64.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Brendan Kowitz</dc:creator>
            <guid>http://kowitz.net/archive/2006/12/11/asp.net-2.0-mozilla-browser-detection-hole.aspx</guid>
            <pubDate>Mon, 11 Dec 2006 02:58:54 GMT</pubDate>
            <wfw:comment>http://kowitz.net/comments/64.aspx</wfw:comment>
            <comments>http://kowitz.net/archive/2006/12/11/asp.net-2.0-mozilla-browser-detection-hole.aspx#feedback</comments>
            <slash:comments>11</slash:comments>
            <wfw:commentRss>http://kowitz.net/comments/commentRss/64.aspx</wfw:commentRss>
            <trackback:ping>http://kowitz.net/services/trackbacks/64.aspx</trackback:ping>
        </item>
        <item>
            <title>Cleaning Up ASP.NET Sessions in Google</title>
            <link>http://kowitz.net/archive/2006/12/06/cleaning-up-asp.net-sessions-in-google.aspx</link>
            <description>&lt;p&gt;&lt;strong&gt;ASP.NET and Dirty Urls&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are two things that have been bothering me about pages that are getting indexed in Google from an ASP.NET application. The first is somehow there are ASP.NET Session Urls ending up in the Google index. This is bad because searchers that actually do click these links are likely to get a 500 error (internal server error) because they will be trying to access a page of an expired session. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.kowitz.net/Attachment.ashx?id=WindowsLiveWriter%2fCleaningUpASP.NETSessionsinGoogle_6A92%2ferror_urls%5b10%5d.jpg" rel="lightbox"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="184" alt="Indexed Session Urls in Google Sitemap tools" width="473" src="http://www.kowitz.net/Attachment.ashx?id=WindowsLiveWriter%2fCleaningUpASP.NETSessionsinGoogle_6A92%2ferror_urls_thumb%5b8%5d.jpg" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How is Google finding all these 'bad' urls?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Well apparently there is no browser definition in ASP.NET 2.0 for the Googlebot's useragent string, so when the spider hits your ASP.NET page it's browser capabilities are not defined.&lt;/p&gt;
&lt;p&gt;&lt;font color="#ff0000"&gt;Edit:&lt;/font&gt; The default browser capabilities are defined to &lt;strong&gt;&lt;font color="#000000"&gt;use cookies&lt;/font&gt;&lt;/strong&gt;, the issue occurs because the base Mozilla definition is defined to &lt;strong&gt;NOT&lt;/strong&gt; use cookies. If the browser is not able to accept cookeis .NET gets around this by inserting the session information into the Url and issues a 302 (content temporarily moved) in the response header. &lt;/p&gt;
&lt;p&gt;This default behaviour is a good and a bad thing. It's good in the fact that if I'm browsing an asp.net site on a pda that doesn't support cookies I still can. However just about every search engine spider ever created has it's own UserAgent string making it a tough task to issue the standard non-crufted url. One solution to fixing the session urls being indexed in Google is to tell your asp.net application that Googlebot supports cookies and the problem is solved. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To read more about the solution please see my &lt;a href="http://www.kowitz.net/2006/12/11/ASPNET+20+Mozilla+Browser+Detection+Hole.aspx"&gt;next post&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dynamic Captcha build-up&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Another dynamic aspect that is used on this site are Captcha images, and yes Google's image spider finds those too. Upon trying a Google image search on my domain, it's littered with Captcha images! I've also added an exclude to the robots.txt file for this.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.kowitz.net/Attachment.ashx?id=WindowsLiveWriter%2fCleaningUpASP.NETSessionsinGoogle_6A92%2fcaptcha_buildup%5b2%5d.jpg" rel="lightbox"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="305" alt="Captcha image build-up in Google image search" width="331" src="http://www.kowitz.net/Attachment.ashx?id=WindowsLiveWriter%2fCleaningUpASP.NETSessionsinGoogle_6A92%2fcaptcha_buildup_thumb.jpg" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution for Captcha images build-up and stop-gap solution for Session Urls&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here is my "robots.txt" file so far for my SingleUserBlog install. *Note the last two lines, "Disallow: /(A(*" should exclude any ASP.NET session urls, (this is not recommended unless you have fixed the Mozilla detection hole). The last line should exclude any captcha images from being indexed.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;User-agent: *&lt;br /&gt;
Disallow: /LoginPage.aspx&lt;br /&gt;
Disallow: /Administration/&lt;br /&gt;
Disallow: /(A(*&lt;br /&gt;
Disallow: /Captcha.ashx*$&lt;/p&gt;
&lt;/blockquote&gt;&lt;img src="http://kowitz.net/aggbug/63.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Brendan Kowitz</dc:creator>
            <guid>http://kowitz.net/archive/2006/12/06/cleaning-up-asp.net-sessions-in-google.aspx</guid>
            <pubDate>Wed, 06 Dec 2006 13:49:27 GMT</pubDate>
            <wfw:comment>http://kowitz.net/comments/63.aspx</wfw:comment>
            <comments>http://kowitz.net/archive/2006/12/06/cleaning-up-asp.net-sessions-in-google.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://kowitz.net/comments/commentRss/63.aspx</wfw:commentRss>
            <trackback:ping>http://kowitz.net/services/trackbacks/63.aspx</trackback:ping>
        </item>
        <item>
            <title>'TextBox' cannot have children of type 'DataBoundLiteralControl'.</title>
            <link>http://kowitz.net/archive/2006/03/13/textbox-cannot-have-children-of-type-databoundliteralcontrol.aspx</link>
            <description>
		&lt;p&gt;From what I've seen this particular error is already pretty well documented, however it is one of the things that Visual Studio is a little misleading about.&lt;/p&gt;
		&lt;p&gt;Seems this is a lesson why you can't always rely on intellisense to tell you what to type.  In a datagrid, the following code will error:&lt;/p&gt;
		&lt;h2&gt;Error:&lt;/h2&gt;
		&lt;pre&gt;&amp;lt;EDITITEMTEMPLATE&amp;gt;
&amp;lt;asp:TextBox id=TextBox1 runat="server"&amp;gt;
  &amp;lt;%# TimeZoneInformation.ToLocalShortDateString(&lt;br /&gt;    (DateTime)DataBinder.Eval(Container.DataItem, "FromDate")) %&amp;gt;&lt;br /&gt;&amp;lt;/asp:TextBox&amp;gt;
&amp;lt;/EDITITEMTEMPLATE&amp;gt;
&lt;/pre&gt;
		&lt;br /&gt;This will land you with a "'TextBox' cannot have children of type 'DataBoundLiteralControl'." error. 
&lt;h2&gt;Solution.&lt;/h2&gt;&lt;pre&gt;&amp;lt;EDITITEMTEMPLATE&amp;gt;&lt;br /&gt;&amp;lt;asp:TextBox id="TextBox1" runat="server" &lt;br /&gt;&lt;font color="#ff0000"&gt;&lt;u&gt;value&lt;/u&gt;&lt;/font&gt;='&amp;lt;%# TimeZoneInformation.ToLocalShortDateString(
    (DateTime)DataBinder.Eval(Container.DataItem, "FromDate")) %&amp;gt;'&amp;gt;
&amp;lt;/asp:TextBox&amp;gt;
&amp;lt;/EditItemTemplate&amp;gt;&lt;/pre&gt;&lt;p&gt;In this case the "value" tag is valid, even though intellisense doesn't think so.&lt;/p&gt;&lt;img src="http://kowitz.net/aggbug/37.aspx" width="1" height="1" /&gt;</description>
            <guid>http://kowitz.net/archive/2006/03/13/textbox-cannot-have-children-of-type-databoundliteralcontrol.aspx</guid>
            <pubDate>Sun, 12 Mar 2006 19:14:54 GMT</pubDate>
            <wfw:comment>http://kowitz.net/comments/37.aspx</wfw:comment>
            <comments>http://kowitz.net/archive/2006/03/13/textbox-cannot-have-children-of-type-databoundliteralcontrol.aspx#feedback</comments>
            <slash:comments>12</slash:comments>
            <wfw:commentRss>http://kowitz.net/comments/commentRss/37.aspx</wfw:commentRss>
            <trackback:ping>http://kowitz.net/services/trackbacks/37.aspx</trackback:ping>
        </item>
    </channel>
</rss>