Solved

I need Page_Load() to call inhertited Page_Load()

Posted on 2011-02-15
4
429 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ASP.NET Web Form Variables being reset 2 18
Hide Tab Page 3 18
VB.NET HttpWebRequest 12 32
Different Delete Messages 7 12
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

20 Experts available now in Live!

Get 1:1 Help Now