ASP.Net如何确保内部绑定控件的正确绑定顺序?
如果我有这样的事情:
<asp:Repeater DataSource='<%# new List<string>() { 'Tom', 'Dick', 'Harry' } %>' Visible='<%# DataTime.Now.Days == 1 %>' runat="server">
.Net 如何确定绑定的顺序?在该示例中,它需要绑定两次——它必须将列表和表达式中的布尔值绑定到中继器...然后再次绑定以循环遍历它?
一般来说,我只是不明白 ASP.Net 如何确定正确的绑定顺序。这些绑定实际上什么时候发生在页面生命周期中?
If I have something like this:
<asp:Repeater DataSource='<%# new List<string>() { 'Tom', 'Dick', 'Harry' } %>' Visible='<%# DataTime.Now.Days == 1 %>' runat="server">
How does .Net determine the order of binding? In that example, it needs to bind twice -- it has to bind the List and the boolean from the expression to a Repeater...which it then binds again to loop through it?
In a general sense, I just don't understand how ASP.Net determines the correct binding order. And when do these binds actually occur in the page lifecycle?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论