Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Should I use Page_Init or OnInit method.

Reply
Thread Tools

Should I use Page_Init or OnInit method.

 
 
harry potter
Guest
Posts: n/a
 
      02-07-2006
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.

 
Reply With Quote
 
 
 
 
Rick
Guest
Posts: n/a
 
      02-07-2006
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.

"harry potter" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OnInit and Page_Init =?Utf-8?B?cm9kY2hhcg==?= ASP .Net 2 10-30-2007 12:34 PM
saving a value in page_init for use later in postback paulcis ASP .Net 2 05-11-2007 09:35 AM
When Page.OnInit is done and exited, can I be sure that ALL child controls have called OnInit as well? Sally ASP .Net 1 04-15-2004 01:15 AM
Using inheritance for web pages - why have a Page_Init when you can override OnInit? ASP .Net 2 07-16-2003 07:32 PM
Using inheritance for web pages - why have a Page_Init when you can override OnInit? ASP .Net 2 07-13-2003 04:07 AM



Advertisments