[英]How can I set the order in which controls get created?
It seems that the order in which controls are declared in the .aspx does not guarantee the order in which they get rendered/loaded/created. 似乎在.aspx中声明控件的顺序并不能保证控件的呈现/加载/创建顺序。
Is it possible to set the order in which controls are 'rendered' ? 是否可以设置控件的“渲染”顺序? Some of my control events have side effects, that is why... (In my case I have two
DetailsView
controls, and I need to be sure the ItemCreated
of one always gets called before the other one's). 我的某些控件事件有副作用,这就是原因...(在我的情况下,我有两个
DetailsView
控件,并且我需要确保始终在其中一个控件的ItemCreated
调用之前)。
Maybe there is just a way to 'wait' in an event until another one is triggered ? 也许只有一种方法可以在某个事件中“等待”,直到触发另一个事件为止?
实际上,这仅是按所需顺序分别在控件上调用DataBind
的问题,而不是默认使用Page.DataBind
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.