Simply put
<% # BIND ("field name") %> two-way binding read/write
<% # Eval ("name") %> Read Only
<% # Databinder. eval (container. dataitem, "sex") %> same as above
<% # Indicates data binding,
Eval is a read-only binding of data. The parent control (such as the gridview) of the bound child control cannot be used to receive modifications made by users. BIND is a bidirectional binding. The so-called bidirectional binding is a data source-display interface bidirectional data
Data Flow, that is, read/write.
Eval can be replaced with bind, but it will reduce the performance. Otherwise, it cannot be replaced.
The container is a container and refers to the parent control. dataitem refers to the current row of the data source bound to the parent control, not a field.
If only the value <% # eval ("field name") %> is displayed, you can.
You can modify the value <% # BIND ("field name") %>.
The following two types of display are the same
<% # Eval ("name") %>
<% # Databinder. eval (container. dataitem, "sex") %>
<% = Indicates that the output variable is equivalent to response. Write (XX ).
Basic Format of databinder. Eval
Databinder. eval (container. dataitem, "XXX", "{0 }")
<% # Databinder. eval (container. dataitem, "XXXX") %>
<% # Databinder. eval (container, "dataitem. XXXX") %>
Question 1: What are their differences?
Question 2: Can they replace each other?
Question 3: What are the containers and dataitems of databinder. eval (container. dataitem?
Answer 1: Eval is a read-only binding to data. The parent control (such as the gridview) of the bound child control cannot be used to receive user input modifications. BIND is a bidirectional binding. The so-called bidirectional binding is a data source-display interface bidirectional data
Data Flow, that is, read/write.
Answer 2: eval can be replaced with bind, but it will reduce the performance. Otherwise, it cannot be replaced.
Answer 3: container refers to the container and the parent control. dataitem refers to the current row of the data source bound to the parent control, not a field.
If only the value <% # eval ("field name") %> is displayed, you can.
You can modify the value <% # BIND ("field name") %>.
The following two types of display are the same
<% # Eval ("name") %>
<% # Databinder. eval (container. dataitem, "sex") %>
this article from the csdn blog, reprinted please indicate the source: http://blog.csdn.net/seraphlei/archive/2008/11/17/3320484.aspx