Basic Format of databinder. Eval Databinder. eval (container. dataitem, "XXX", "{0 }") <% # Databinder. eval (container. dataitem, "XXXX") %> or <% # Databinder. eval (container, "dataitem. XXXX") %> Another method is said to be highly efficient by Microsoft. <% # (Datarowview) container. dataitem) ["XXXX"] %> However, this method must be used to import the namespace system. Data on the foreground page. Otherwise, an error message <% @ import namespace = "system. Data" is generated" %> 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? Problem 3: databinder. eval (container. dataitem ,"") What are the container and dataitem respectively? 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") %> |