gpt4 book ai didi

ASP.NET : What does the '#' starting a <% %> mean?

转载 作者:行者123 更新时间:2023-12-02 18:39:13 26 4
gpt4 key购买 nike

我已经在 asp.net 中使用转发器控件有一段时间了..并且时不时地我总是忘记在 < %# DataBinder.Eval(Container.DataItem, "NAME"内添加 '#' )%>

所以我想知道这是什么意思?

最佳答案

这表明您是binding an expression正如您演示的 eval 或 bind 一样。

数据绑定(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.

关于ASP.NET : What does the '#' starting a <% %> mean?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1496938/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com