Page_Init vs OnInit

后端 未结 6 568
日久生厌
日久生厌 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:58

    OnX because mostly it is the preferred technique for handling the event in a derived class according to MSDN.

提交回复
热议问题