Should I use Page_Init or OnInit method.

  • Thread starter Thread starter harry potter
  • Start date Start date
H

harry potter

Hi,

Are there any reasons to use OnInit or Page_Init method to invoke some
code when the Init event is triggered, if at all. Or are they both just
the same?

-S.
 
In general, a method such as OnInit is implemented (or overriden) by a sub
(inheriting) class, whereas an event handler is implemented by all other
classes that want to be notified when the page init occurs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top