what is eval and bind in asp.net

1) Eval() is used when data is read only. If data can be updated then Bind() is used.

2) Eval is a protected method defined on the TemplateControl class, from which the Page class is derived.

3) Bind is a new ASP.NET 2.0 databinding keyword. It’s not a method of any specific class.

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

5) 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.

6) 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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s