Difference between OnLoad method and Load event?

后端 未结 3 1551
星月不相逢
星月不相逢 2021-02-19 22:34

What is the difference between OnLoad method and Load event? I am developing WinForm controls. Should I register to Load event or override

3条回答
  •  星月不相逢
    2021-02-19 22:58

    OnLoad is the default event handler used in VB.NET to handle the Load event. I typically override this method when I need to attach code to the load event. There are also default functions for the other Page Life Cycle events: OnPreRender, OnInit, etc.

提交回复
热议问题