• Home /
  • Blog /
  • Eval vs Bind for ASP.NET
bind-vs-eval-in-asp-net.png

Eval vs Bind for ASP.NET

When you start working with ASP.NET sometimes it’s difficult to understand what is the difference between Eval and Bind for data binding controls in ASP.NET.

If you just need to display data on the screen from DataSource, it’s enough to use Eval. It’s something like a read-only method from DataSource.

But if you need to edit data inside of Grid you have to use Bind method because it provides two-way binding. You can read data from DataSource, and you can write data back. Usually you have to use this method if you need to quickly develop a WebPages and display and edit data from one table or simple view.

If you try to modify some rows in Data Grid and want to make changes in the code behind class (OnUdpdating event), data with Eval method will not be available instead of Bind method.

Get latest updates directly into your inbox


Comments

Yaplex logo white text

Yaplex is an IT Consulting and .NET development company co-founded by .NET Developer Alex Shapovalov who lives in Mississauga and provides software development services in Toronto, Mississauga, and GTA.

Contact Information

Toronto, Canada
Phone: +1 647 328 3809