Home > Article > Web Front-end > Data binding methods such as Eval(), XPath(), and Bind() can only be used in the context of a data-bound control_html/css_WEB-ITnose
The background code can be displayed normally when writing Eval("cbr") == "" ? "Distribution" to
because the status of the logged-in person needs to be judged. To add a judgment, replace it with
<%= Session["yhlx"].ToString() == "KZ" ? Eval("cbr") == "" ? "Distribution b>" : "" : ""%>
, the page error is as follows,
Data binding methods such as Eval(), XPath() and Bind() can only be used in data binding used in the context of the control.
Has anyone encountered this problem?
Problem solution