Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can <code>Databind()</code> entire <code>Me</code> or a container control (you can add a <code>PlaceHolder</code> control around your desired controls also). because <code>DataBind()</code> goes recursively on Child controls.</p> <p>A better approach if you don't need DataBinding except for this is to use Code Expression Binder</p> <p><a href="http://weblogs.asp.net/infinitiesloop/archive/2006/08/09/The-CodeExpressionBuilder.aspx" rel="nofollow">http://weblogs.asp.net/infinitiesloop/archive/2006/08/09/The-CodeExpressionBuilder.aspx</a></p> <p>This allows you to use <code>&lt;%$ Code: Me.Property %&gt;</code> instead of <code>&lt;%# Me.Property %&gt;</code>.</p> <p>For more about expression builders in general if you don't know them at all check this intro post: <a href="http://www.4guysfromrolla.com/articles/022509-1.aspx" rel="nofollow">http://www.4guysfromrolla.com/articles/022509-1.aspx</a></p> <p>Note that <code>&lt;%= Me.Property %&gt;</code> will NOT work on web controls like <code>&lt;asp:TextBox ...</code> and such...</p> <p><strong>P.S.</strong></p> <p>The only drawback with <code>Code</code> expression builder is that you get no intellisense. I usually work around this by writing <code>&lt;%= Me.TestSomething %&gt;</code> inside the markup to get my intellisense, and then replace <code>&lt;%=</code> with <code>&lt;%$ Code:</code> when done. Annoying, but if you don't want to go the DataBind() route (and you shouldn't cause it may conflict with existing real data binding you want to do. Trust me, trying to make those work is hell), then this is the way to go.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload