What does <%# "whatever" %> mean in ASP.NET?

Mark Biek picture Mark Biek · Dec 2, 2011 · Viewed 24.5k times · Source

Possible Duplicate:
Meaning of the various symbols in .aspx page of asp.net

I'm familiar with <%= "whatever" %> as a shortcut for <% Response.Write("whatever"); %>.

But I've recently come across some code that uses <%# %> instead. In this particular codebase, it's only being used inside of an <asp:Repeater /> but I

What does <%# %> do and when can/should it be used?

Answer

Leniel Maccaferri picture Leniel Maccaferri · Dec 2, 2011

<%# ... %>

Data-binding expressions are an important set of code delimiters, which are used to create a binding between a server control property and a data source.

More about it here:

ASP.NET Code Delimiters