The Iron Yuppie

Thought[ful|less] coverage of news, politics, technology and anything else that catches my fancy.

Sunday, April 09, 2006

 

Searching for the Unsearchable

Searching for the Unsearchable

Boy, this took a long time. A REALLY long time.

I needed to find out a little bit more about a specific tag in ASP.net. Specifically, the '<%' tag. So why not just drop it in a search engine? All the major search engines block searching for this kind of text. It's an incredible pain.

Fortunately, I was lucky enough to find a term that was always associated with this (in this case databinding) that helped me search for it. After browsing through about a million websites, I finally found someone who had the same problem. Let me hand it over to Tone's website.

http://tonesnotes.org/2004/06/16/aspnet-code-block-mystery


It's remarkably hard to search for syntax like "<%=" if you want to find something that speaks about the syntax rather than all the pages that use it.

I ran into a case where apparently identical code blocks in the same .ascx file were being treated differently. One was expanded and the other was treated as a literal.

The problem ended up being that a "runat=server" attribute had been added to the element with the failing code block.

A normal inline ASP.NET code substitution block uses the syntax <%= … %>.

ASP.NET databinding uses the syntax <%# … %>.

<%@ … %> is WebForms syntax. One of the following must follow the @: Page, Control, Import, Implements, Register, Master, MasterType, OutputCache, Reference

<% … %> executes a block of inline code.

<%= … %> does a Response.Write of the value of inline code.

<%# … %> does data-binding

<%$ … %> is used for configuration file substitutions



Thank you Tone!

D

Comments: Post a Comment





<< Home

Archives

10/01/2003 - 11/01/2003   11/01/2003 - 12/01/2003   12/01/2003 - 01/01/2004   01/01/2004 - 02/01/2004   02/01/2004 - 03/01/2004   03/01/2004 - 04/01/2004   04/01/2004 - 05/01/2004   05/01/2004 - 06/01/2004   06/01/2004 - 07/01/2004   07/01/2004 - 08/01/2004   08/01/2004 - 09/01/2004   09/01/2004 - 10/01/2004   10/01/2004 - 11/01/2004   11/01/2004 - 12/01/2004   12/01/2004 - 01/01/2005   01/01/2005 - 02/01/2005   02/01/2005 - 03/01/2005   03/01/2005 - 04/01/2005   04/01/2005 - 05/01/2005   05/01/2005 - 06/01/2005   06/01/2005 - 07/01/2005   07/01/2005 - 08/01/2005   08/01/2005 - 09/01/2005   09/01/2005 - 10/01/2005   10/01/2005 - 11/01/2005   11/01/2005 - 12/01/2005   12/01/2005 - 01/01/2006   01/01/2006 - 02/01/2006   02/01/2006 - 03/01/2006   03/01/2006 - 04/01/2006   04/01/2006 - 05/01/2006   05/01/2006 - 06/01/2006   06/01/2006 - 07/01/2006   07/01/2006 - 08/01/2006   08/01/2006 - 09/01/2006   09/01/2006 - 10/01/2006   10/01/2006 - 11/01/2006   11/01/2006 - 12/01/2006   12/01/2006 - 01/01/2007   01/01/2007 - 02/01/2007   02/01/2007 - 03/01/2007   03/01/2007 - 04/01/2007   04/01/2007 - 05/01/2007   05/01/2007 - 06/01/2007   06/01/2007 - 07/01/2007   08/01/2007 - 09/01/2007   10/01/2007 - 11/01/2007   11/01/2007 - 12/01/2007   12/01/2007 - 01/01/2008   01/01/2008 - 02/01/2008   02/01/2008 - 03/01/2008   06/01/2008 - 07/01/2008   07/01/2008 - 08/01/2008   08/01/2008 - 09/01/2008   10/01/2008 - 11/01/2008  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]