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

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
 
J

Jos

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.
 
S

Scott Allen

<% %> 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

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top