Home > DeveloperSection > Interviews > What is difference between Eval() and Bind() method in Asp.Net?

Posted on    May-19-2012 3:33 AM

 ASP.Net ASP.Net 
Ratings:
 2 Answer(s)
  2549  View(s)
Rate this:

Tanuj Kumar

Total Post:30

Points:150
Posted on    May-19-2012 12:00 AM

The difference between Eval and Bind is that Eval function is used to bind data to control inside a DataBound control, but it cannot update the values back to the database.

On the other hand, Bind function can be used to bind data to control inside a DataBound control and also it can update the values back to the database.

But the above explanation did not give me clear idea and hence I wrote two examples in order to illustrate the functioning Eval and Bind functions in ASP.Net.

There are basically two difference in between them...

  • Eval() is Unidirectional where as Bind() is Bi-Directional.
  • Eval() can combine more than two filed where as Bind() cannot do this Operation.

Modified On May-08-2016 11:53:27 PM

AVADHESH PATEL

Total Post:257

Points:1285
Posted on    May-22-2012 12:00 AM

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

Don't want to miss updates? Please click the below button!

Follow MindStick