# 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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top