Last post Aug 06, 2011 08:04 AM by Ved Prakash Nunia
Dec 24, 2007 09:15 PM|bikerboy|LINK
I built a grid view control for display.In this situation,is any difference between Eval() and Bind() ?
Dec 24, 2007 09:20 PM|nital soni|LINK
Eval is a protected method defined on the TemplateControl class, from which the Page class is derived.
Bind is a new ASP.NET 2.0 databinding keyword. It's not a method of any specific class.
Eval is used for unidirectional (readonly) data binding, while Bind is for bi-directional (editable) databinding.
ASP.NET supports a hierarchical data-binding model that creates bindings between server control properties and data sources. Almost any server control property can be bound against any public field or property on the containing page or on the server control's
immediate naming container.
Data-binding expressions use the Eval and Bind methods to bind data to controls and submit changes back to the database. The Eval method is a static (read-only) method that takes the value of a data field and returns it as a string. The Bind method supports
read/write functionality with the ability to retrieve the values of data-bound controls and submit any changes made back to the database.
Dec 24, 2007 10:09 PM|bikerboy|LINK
Thanks for your help,Nital
Have a nice day!
Aug 06, 2011 03:03 AM|bimalkinkar|LINK
Evel("<fildname>") 1. is a method will retrive data object data to Eval() location. 2. Evel() is used to one-way communication i.e we can only use Evel() to retrive data from data object. 3.
Evel() is always return object.
Bind(<fieldname>) 1. is a method will retrive data as well as update the data object data 2. Bind() is used to two-way communication i.e retrive as well as update . 3. Bind() is always depend
on the control object bcz control object having facility for two-way communication also.
Aug 06, 2011 08:04 AM|Ved Prakash Nunia|LINK