什么是之间和LT的差异; #eval和&lt; #bind在asp.net [英] What's the difference between <#eval and <#bind in asp.net
问题描述
在一个gridview,我们可以使用&LT;%#评估和演示%GT;
或&LT;%#绑定%GT;
来从数据库输出值。它们之间的区别是什么?
In a gridview, we can use <%#Eval%>
or <%#Bind%>
to output values from a database. What is the difference between them?
推荐答案
评估是一种方法绑定,绑定是双向
EVal is one way binding, Bind is two way
如果您绑定使用eval的值,它是只喜欢读。您只能查看数据。
If you bind a value using Eval, it is like a read only. You can only view the data.
如果您绑定使用绑定的值,如果你这样做的价值有所改变,将反映在数据库中还
If you bind a value using Bind, and if you do some change on the value it will reflect on the database also
您可以看到类似的帖子在这里堆栈溢出
you can see similar post here on stack overflow
<一个href=\"http://stackoverflow.com/questions/259141/difference-between-bind-and-eval\">http://stackoverflow.com/questions/259141/difference-between-bind-and-eval
这篇关于什么是之间和LT的差异; #eval和&lt; #bind在asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!