# in: <%# DataBinder.Eval(...)%>

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
Can anyone explain what the "#" does in a DataGrid template column like
<%# DataBinder.Eval(Container, "DataItem.Phone") %

I don't see anything about it in the MSDN help

Thanks
Mar
 
Mark said:
Hello,
Can anyone explain what the "#" does in a DataGrid template column like:
<%# DataBinder.Eval(Container, "DataItem.Phone") %>

I don't see anything about it in the MSDN help.

Thanks,
Mark

It is usually referred to as "databinding syntax".

It indicates that the code must be executed during the DataBind() method,
as compared to <%...%> code,which is executed during rendering.

Search Google for "asp.net" and "databinding syntax", and you will learn
more.
 
<% %> blocks are executed during rendering.

<%# %>blocks are executed during data binding.

HTH,
 
Back
Top