在ASP.NET中的PreInit和Init? [英] PreInit and Init in asp.net ?

查看:116
本文介绍了在ASP.NET中的PreInit和Init?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以解释一个asp.net Web应用程序的preinit()和init()方法之间的区别吗?

通常会赞赏一个合适的示例……请解决方案

在init事件之前调用Preinit,在init事件期间调用init.我个人认为它已经变得过于精细,但是如果您的代码很复杂并且跨越许多控件,那么它将有助于控制操作的顺序.


请看下面的链接了解Asp.Net页面生命周期事件.

http://msdn.microsoft.com/en-us/library/ms178472.aspx [ ^ ]

http://wiki.asp.net/page.aspx/1512/aspnet -page-life-cycle-events/ [ http://www.asp.net/general/videos/page-lifecycle-events [ ^ ]


Can Someone Explain about the difference between the preinit() and init() method of one asp.net web app.

A proper example is mostly appreciated...please

解决方案

Preinit is called before the init event, init is called during. Personally I think it''s become far too granular, but if your code is complex and across many controls, it helps to control the order of operations.


Have a look at below links to understand Asp.Net Page Life Cycle Events.

http://msdn.microsoft.com/en-us/library/ms178472.aspx[^]

http://wiki.asp.net/page.aspx/1512/aspnet-page-life-cycle-events/[^]


The following link will make you clear regarding your question.

http://www.asp.net/general/videos/page-lifecycle-events[^]


这篇关于在ASP.NET中的PreInit和Init?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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