简体   繁体   English

MasterPage to Page中的ASP.net事件

[英]ASP.net Events in MasterPage to Page

I have a masterpage that has a dropdownlist. 我有一个具有下拉列表的母版页。 The data in the page is reliant on the dropdownlist of the master. 页面中的数据取决于主数据库的下拉列表。 However, when the dropdownlist is changed, it appears the page events fire before the dropdownlist changed event in the masterpage, so the data is not updated. 但是,当下拉列表更改时,页面事件似乎在母版页中的下拉列表更改事件之前触发。因此,数据不会更新。

The only way I can see this is working, is making the events happen in page prerender. 我能看到的唯一方法是使事件在页面预渲染中发生。

Anyone have a better solution? 有人有更好的解决方案吗?

The only thing I was able to do to make this work was move my load events to prerender events (like I mentioned in my original post) based on the the life cycle. 我要做的唯一一件事就是根据生命周期将加载事件移动到预渲染事件(如我在原始帖子中提到的那样)。 If anyone has a better idea, please post. 如果有人有更好的主意,请发布。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM