[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

I need Page_Load() to call inhertited Page_Load()

Posted on 2011-02-15
4
Medium Priority
?
453 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 9

Assisted Solution

by:gdupadhyay
gdupadhyay earned 400 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 800 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 800 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

649 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