473,385 Members | 1,326 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,385 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 2017
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.