Page_Init vs OnInit

后端 未结 6 537
日久生厌
日久生厌 2020-12-08 07:40

Between handling the Page_Init event or overriding the OnInit method of a Page, which one is better to use? Thanks.

6条回答
  •  伪装坚强ぢ
    2020-12-08 07:46

    I had this very question about a year ago, I settled on overridding as opposed to the On_X Events. Here is the article I read covering the pros and cons: http://weblogs.asp.net/infinitiesloop/archive/2008/03/24/onload-vs-page-load-vs-load-event.aspx

提交回复
热议问题