Should I use Page_Init or OnInit method.

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.
 
R

Rick

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

Members online

Forum statistics

Threads
474,266
Messages
2,571,087
Members
48,773
Latest member
Kaybee

Latest Threads

Top