问题描述
我有一吨code的是在页面的页面加载事件处理的一个asp.net网页。我也有,应与新值重新加载页面在页面上一个下拉框,但我想我处理整个页面加载code之前得到这个新的价值。
我试图让我周围的ASP.NET页面生命周期的头。
I have an asp.net web page with a ton of code that is handled in the Page-Load event of the page. I also have a dropdown box on the page that should reload the page with a new value, but I would like to get this new value before I process the entire Page-Load code.I am trying to get my head around ASP.NET page lifecycle.
我应该移动页面加载code到以后的事件或有没有办法之前得到下拉列表值的值的页面加载活动开始?
Should I move the Page-Load code to a later event or is there a way to get the value of the dropdown list value before the the Page-Load event begins?
TIA
推荐答案
我会用Page_ preLOAD代替Page_Init,因为所有的回传数据进行处理后,将它提升。
I would use Page_PreLoad instead of Page_Init, because it is raised after all postback data is processed.
这篇关于之前的Page_Load事件处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!