What's the difference between <#eval and <#bind in asp.net

Eval does one-way binding; Bind is two-way.

If you bind a value using Eval, it is read-only. You can only view the data.

If you bind a value using Bind, changes to values will be reflected in the database as well.

You can refer to this similar post here on stack overflow: What is the difference between <%# Bind("") %> and <%# Eval("") %> in ASP.NET?


eval is one way, bind is two way. If you aren't wanting to handle data posted back, eval will do the job.


The main difference between eval and bind is eval is read only, we can't change on database thing eval.

While using bind we can appply some change to the database.

Tags:

Asp.Net