Difference between Bind and Eval

Short Description

  • Eval is used for unidirectional (readonly) data binding
  • Bind is for bi-directional (editable) databinding.

In ASP.NET 1.1 the databinding tags were

  • <%# DataBinder.Eval(Container.DataItem, “expression“ ) %>
  • <%# DataBinder.Eval( “, “, “format string“) %>

ASP.NET 2.0 offer those as well as the following

  • <%# Eval(“expression“) %>
  • <%# Eval(“expression“, “format string“) %>
  • <%# Bind(“expression“) %>
  • <%# Bind(“expression“, “format string“) %>