【问题标题】:Simulating <%#Bind(...) %>模拟 <%#Bind(...) %>
【发布时间】:2010-09-15 17:37:13
【问题描述】:

ASP.Net:

在代码隐藏中,我可以通过调用 DataBinder.Eval(myObject,"Property"); 来模拟 &lt;%# Eval("Property")%&gt;

如何模拟对&lt;%# Bind("Property")%&gt; 的调用?

非常感谢

【问题讨论】:

    标签: c# asp.net data-binding


    【解决方案1】:

    DataBinder.GetPropertyValue(myObject,"Property")

    【讨论】:

    • 这个做双向数据绑定的方式和
    • 没有。双向绑定有点复杂,由 ControlBuilder 类在内部处理,该类使用 ExpressionBuilderContext、ExpressionBuilder、DataBindingCollection、DataBinding 和 BoundPropertyEntry 类来处理
    猜你喜欢
    • 2013-10-03
    • 2012-07-12
    • 2016-04-26
    • 1970-01-01
    • 1970-01-01
    • 2014-01-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多