qJake
qJake

Reputation: 17119

What functions are allowed inside <%# ... %> tags?

In ASP.NET, what functions are allowed inside the <%# %> tags? I frequently use Databinder.Eval(), and I know some basic things like CStr(), but where can I find a complete list with documentation? I would look myself, but honestly I don't even know what the name of the <%# %> tags are.

Upvotes: 1

Views: 292

Answers (2)

James McCormack
James McCormack

Reputation: 9934

It's funny that nobody really knows what these are called - I think in the ASP.NET MVC team they call them Code Nuggets. Others call them Code Rendering Blocks.

Anyway, this is essential reading: http://quickstarts.asp.net/QuickstartV20/aspnet/doc/pages/syntax.aspx

Here is some specific info on the <%# Data Binding Syntax: http://msdn.microsoft.com/en-us/library/bda9bbfx%28v=VS.100%29.aspx

And this helped me understand the Eval voodoo: http://weblogs.asp.net/rajbk/archive/2004/07/20/what-s-the-deal-with-databinder-eval-and-container-dataitem.aspx

Upvotes: 2

Josh M.
Josh M.

Reputation: 27773

Anything that is in scope. E.g. public/protected methods on your page, public methods in some referenced namespace/class, etc. In addition to things that are related to the current NamingContainer you're within.

Upvotes: 1

Related Questions