控制页面的asp.net中的触发 [英] controls firing in asp.net of a page

查看:71
本文介绍了控制页面的asp.net中的触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我的页面上有很多控件,例如dropdownlist,listbox,checkbox,button等以及表单加载事件都将调用所有事件,并且页面代码非常复杂,这意味着超过5000行的代码非常庞大,因此在调试中将花费2倍的时间.

有什么方法可以让哪个事件首先触发.

谢谢您

Hi all,


I have a page there are lots of controls e.g. dropdownlist,listbox,checkbox,button etc and form load event all the events are called and the page code is very complex means very huge code more than 5000 lines so in debugging it''s taking 2 much of time.

Is there any way to get which event fires first.

Thanking You

推荐答案

阅读 ASP.NET应用程序和页面生命周期 [ ^ ]




如果您的网页有母版页.内容页面"Page_Load"事件将首先触发,然后是母版页面"Page_Load"事件.其他人将被相应解雇. (例如,如果您在页面上有一个用户控件,则其"Page_Load"事件将在下一次触发)

谢谢
希望这能给您一些想法
Hi,

If your web page has a master page. The content page "Page_Load" event will fire first, then the master page "Page_Load" event. The others will be fired accordingly. (like if you have a usercontrol on the page its "Page_Load" event will be fireed next)

Thanks
Hope this gives you some idea


这篇关于控制页面的asp.net中的触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆