开发者

How does ASP.Net ensure the correct binding order of internally-bound controls?

开发者 https://www.devze.com 2023-01-12 08:15 出处:网络
If I have something like this: <asp:Repeater DataSource=\'<%# new List<string>() { \'Tom\', \'Dick\', \'Harry\' } %>\' Visible=\'<%# DataTime.Now.Days == 1 %>\' runat=\"server\"&

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 开发者_StackOverflow中文版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?

0

精彩评论

暂无评论...
验证码 换一张
取 消