473,231 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

OnInit method of a System.Web.UI.Page Class

Hi,

I have a newbie question, every time I add a web page into a web application
using VS.Net there is a method automatically generated by VS.Net:

override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

I look into Page class more than 10 times already, there is no OnInit method
defined.

Question:
(1) If base class has no such method defined, what will base.OnInit(e) do?

TIA
Nov 18 '05 #1
3 2011
the Page class inherits the OnInit

-- bruce (sqlwork.com)
"Raymond Du" <rd**@yahoo.com> wrote in message
news:e5**************@tk2msftngp13.phx.gbl...
Hi,

I have a newbie question, every time I add a web page into a web application using VS.Net there is a method automatically generated by VS.Net:

override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

I look into Page class more than 10 times already, there is no OnInit method defined.

Question:
(1) If base class has no such method defined, what will base.OnInit(e) do?
TIA

Nov 18 '05 #2
Could you elaborate? Inherits from which class?

Thanks Again.

"bruce barker" <no***********@safeco.com> wrote in message
news:OZ*************@TK2MSFTNGP09.phx.gbl...
the Page class inherits the OnInit

-- bruce (sqlwork.com)
"Raymond Du" <rd**@yahoo.com> wrote in message
news:e5**************@tk2msftngp13.phx.gbl...
Hi,

I have a newbie question, every time I add a web page into a web

application
using VS.Net there is a method automatically generated by VS.Net:

override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

I look into Page class more than 10 times already, there is no OnInit

method
defined.

Question:
(1) If base class has no such method defined, what will base.OnInit(e)

do?

TIA


Nov 18 '05 #3
Never mind. I found the answer: System.UI.Web.Control.
"Raymond Du" <rd**@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Could you elaborate? Inherits from which class?

Thanks Again.

"bruce barker" <no***********@safeco.com> wrote in message
news:OZ*************@TK2MSFTNGP09.phx.gbl...
the Page class inherits the OnInit

-- bruce (sqlwork.com)
"Raymond Du" <rd**@yahoo.com> wrote in message
news:e5**************@tk2msftngp13.phx.gbl...
Hi,

I have a newbie question, every time I add a web page into a web

application
using VS.Net there is a method automatically generated by VS.Net:

override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}

I look into Page class more than 10 times already, there is no OnInit

method
defined.

Question:
(1) If base class has no such method defined, what will
base.OnInit(e) do?

TIA



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
Sorry, I mixed up the code- reposting with correct example now :) I'm trying to better understand the use of inheritance vs. the implementation of a handler. I wanted to ask this question to the...
3
by: Stuart McGraw | last post by:
I have a wxPython app, conventionally structured with a Application class derived from wx.App. My problem is that the app accepts a command line argument that must be acted upon within the...
1
by: | last post by:
Hi, All, I'm having problems getting OnInit to fire in my UserControl, when I use a custom template to render the control. The control will render to the browser and it wasn't until I needed...
8
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue...
2
by: Brandon Potter | last post by:
Why is it that when I override the OnInit method for a page, I can add a user control like this: Me.Controls.Add(LoadControl("MyControl.ascx")) (where MyControl.ascx is your every day user...
1
by: tatemononai | last post by:
I've got a asp.net page that is derived off a custom class. The base class does some init stuff in OnInit that is needed by the derived pages. I'm having a timing problem with OnInit. The OnInit...
1
by: harry potter | last post by:
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.
0
by: multiformity | last post by:
Ok, so I have gone off and documented the lifecycle of a page with a custom composite control on it. You can find that document here: http://www.ats-engineers.com/lifecycle.htm Now, I am...
3
by: Beavis | last post by:
I hate to repost a message, but I am still at the same point where I was when I originally posted, and hopefully someone else will see this one... Ok, so I have gone off and documented the...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.