Solved

I need Page_Load() to call inhertited Page_Load()

Posted on 2011-02-15
4
430 Views
Last Modified: 2012-05-11
I have a class, Site, that I want to inherit from. And I want Site.Page_Load() to perform some authentication.  But I don't know how to make the child's Page_Load() call Site.Page_Load().

It's

base.Page_Load() does not appear in IntelliSense.

What am I missing?

newbieweb
0
Comment
Question by:newbieweb
4 Comments
 
LVL 9

Assisted Solution

by:gdupadhyay
gdupadhyay earned 100 total points
ID: 34898475
See this URL, might be help you.
http://forums.asp.net/p/1601418/4076577.aspx#4076577
0
 
LVL 16

Accepted Solution

by:
ToddBeaulieu earned 200 total points
ID: 34898936
I read your question as you're actually subclassing a page, rather than using popups.

If that's correct, here is a discussion on it, as well as a "gotcha" on the order of events (and a fix).

You wouldn't invoke the parent's Page_Load, as it's an event, not a method. Sure, it's sunk with a method, but it's an event. Anyway, this example shows how to do this:

http://www.15seconds.com/issue/060413.htm
0
 
LVL 16

Assisted Solution

by:BurnieP
BurnieP earned 200 total points
ID: 34902201
If it is inherited, you should be able to call base.OnLoad(e);

protected void Page_Load(object sender, EventArgs e) {
      base.OnLoad(e);
}
0
 

Author Closing Comment

by:newbieweb
ID: 34916400
Thanks!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now