467,145 Members | 1,067 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,145 developers. It's quick & easy.

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
  • viewed: 1775
Share:
3 Replies
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Stuart McGraw | last post: by
1 post views Thread by | last post: by
2 posts views Thread by Brandon Potter | last post: by
1 post views Thread by tatemononai@gmail.com | last post: by
1 post views Thread by harry potter | last post: by
reply views Thread by multiformity@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.