What is the difference between <%# Bind("") %> and <%# Eval("") %> in ASP.NET? What is the difference between <%# Bind("") %> and <%# Eval("") %> in ASP.NET? asp.net asp.net

What is the difference between <%# Bind("") %> and <%# Eval("") %> in ASP.NET?


Eval is one-way, read only databinding.

Bind is two-way, read/write databinding.

See here and here.


Bind() is used for two-way databinding. So when used with the proper type of datasource, it will pull the altered values out of the GridView or other control, and save them back to the database.

Eval() is a one-way, "read only" way to bind the values.