Examples of data binding Eval and Bind applications in ES0en. net

  • 2020-12-21 18:01:13
  • OfStack

Key words:

Eval (single binding) Single data binding 1 is commonly used for data presentation. Eval data binding applies the principle of reflection to return data.
In addition to displaying the data, a two-way data binding also automatically writes changes to the interface data back to the bound data source.

Eval

One-way data binding, which presents data from the data source to the interface. When we talk about data presentation, we have to consider the format of the data, such as the date format. This, of course, is what Eval cares about.

General data binding

< %#Eval(" property name ")% >

Data binding with data format

< %#Eval(" property name ","{0: format string}")% >

Data binding with formatted strings

< %#Eval(" Attribute name "," Home. aspx? id={0}")% >

Bind

General data binding

< %#Bind(" property name ")% >

Data binding with format

< %#Bind(" property name ", "{0: data format}") % >

Related articles: