我一直在asp.net中使用转发器控件已经有一段时间了……我时不时地忘记在<内部添加'#'了. %#DataBinder.Eval(Container.DataItem,“NAME”)%>
所以我想知道它是什么意思?
解决方法
它表示您是
binding an expression,因此您演示了eval或bind.
数据绑定语法
Data-binding expressions are contained within <%# and %> delimiters and use the Eval and Bind functions. The Eval function is used to define one-way (read-only) binding. The Bind function is used for two-way (updatable) binding. In addition to calling Eval and Bind methods to perform data binding in a data-binding expression,you can call any publicly scoped code within the <%# and %> delimiters to execute that code and return a value during page processing.