473,405 Members | 2,167 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,405 software developers and data experts.

The inherit of WebForm

ad
I have a webform call MyWebPage, which is inherited from a Base web page
call BaseWebPage.

There is a Page_load event in the BaseWebForm.

Need it add a Page_Load event like below in the MyWebPage for calling the
Page_Load event in the BaseWebForm.


new void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
}
Apr 25 '06 #1
2 1724

"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:O2**************@TK2MSFTNGP04.phx.gbl...
I have a webform call MyWebPage, which is inherited from a Base web page
call BaseWebPage.

There is a Page_load event in the BaseWebForm.

Need it add a Page_Load event like below in the MyWebPage for calling the
Page_Load event in the BaseWebForm.


new void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
}


Page_Load is an event, not a method. What you are probably looking for is
an event named OnPageLoad, or OnLoad or similar method that you can
override.

HTH,
Mythran

Apr 25 '06 #2
You can have the base subscribe the event as well as the implementor ..

in the base's constructor you can say ...

this.OnLoad += new eventhandler(this.BasePageLoad);

another option would be to make the handler in the base virtual and then
override it in the deriving class.

Cheers,

Greg

this
"ad" <fl****@wfes.tcc.edu.tw> wrote in message
news:O2**************@TK2MSFTNGP04.phx.gbl...
I have a webform call MyWebPage, which is inherited from a Base web page
call BaseWebPage.

There is a Page_load event in the BaseWebForm.

Need it add a Page_Load event like below in the MyWebPage for calling the
Page_Load event in the BaseWebForm.


new void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
}

Apr 26 '06 #3

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

Similar topics

7
by: Fabian Neumann | last post by:
Hi! I got a problem with font-family inheritance. Let's say I have CSS definitions like: p { font:normal 10pt Verdana; } strong { font:normal 14pt inherit;
0
by: Andrew | last post by:
Hi, Until now, I have used a single webform for my web app, and everything's been OK. Now, I've decided to create a main menu webform. So, I've got two webforms. Using Visual Studio .NET (with...
1
by: hqdtech | last post by:
how to refresh webform from other webform I have 2 webform, i want if webform A was close then webform B wil refresh. And the problem second: how to catch packet on the network in C#. ...
3
by: trint | last post by:
Ok, I have tried to do this with the System.Web.UI and can't find anything for the webform. It seems much easier for a Winform. Any help in trapping Webform keydown event and keyup event is...
5
by: Jerry | last post by:
I am using .Net 2003. I have been working with this ASP.Net webform that I created a few weeks ago. It has been working fine. However, while modifying the webform today, this webform stopped...
4
by: David | last post by:
I have trying to have a webform inherit controls from another form and can't get it to work Say I have a form that saves the person's demographic info. ****one.aspx**** //I have an object...
2
by: Craig Douthitt via DotNetMonster.com | last post by:
I am trying to capture an buttonclick on a usercontrol in the webform the usercontrol resides in. After researching this issue, I've come to believe that the best way of handling this is by raising...
3
by: Guillaume Hanique | last post by:
Hi, I feel very stupid. I simply want to derive a control from system.web.ui.webcontrols.button and use that on my webform, but I just can't get it done. Can anyone tell me how to do that? I...
2
by: GTalbot | last post by:
Hello fellow comp.infosystems.www.authoring.stylesheets colleagues, Imagine this situation: #grand-parent-abs-pos { height: 400px; position: absolute; width: 600px; }
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.