CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 12/7/2004 7:54:02 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 27 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
jukes1
Asp.Net User
HowTo: Inherit from a common page class?12/7/2004 7:54:02 PM

0/0

I need to dynamically set the MasterPageFile based on some user information to provide different branded access to pages on my website.

I am storing the MasterPageFile path in a Profile variable called MasterPageFile that is stored for anonymous user access. Then I am overriding the pages PreInit event as follows:
public void Page_PreInit(object sender, EventArgs e)

{
this.MasterPageFile = Context.Profile.GetPropertyValue("MasterPageFile").ToString();
}
This happens all over the site, so I want to move it into a superclass called "BrandedPage" and then have the pages on my site inherit from "Branded Page".

There are a couple of pages that don't use masters, so I don't want those pages to inherit from the custom superclass.

I can't find an "Inherits" property in the @Page directive. How do I set this up?
Fredrik N
Asp.Net User
Re: HowTo: Inherit from a common page class?12/7/2004 8:02:03 PM

0/0

Use the Inherits attribute ofthe Page directive:

<%@ Page Inherits="" ...

this will be changed in beta 2, where you can in the code-behind inherit your class instead.
/Fredrik Norm?n NSQUARED2
Microsoft MVP, MCSD, MCAD, MCT

Cornerstone

My Blog, ASP.Net 2.0 etc
jukes1
Asp.Net User
Re: HowTo: Inherit from a common page class?12/7/2004 8:10:42 PM

0/0

heh... it wasn't being intellisensed so I didn't realize it existed. Is it deprecated?
jukes1
Asp.Net User
Re: HowTo: Inherit from a common page class?12/7/2004 8:18:38 PM

0/0

And is there any way to set up a default page class for a site. I only want to specify an "Inherits" tag for pages that do NOT inherit from BrandedPage.
Fredrik N
Asp.Net User
Re: HowTo: Inherit from a common page class?12/7/2004 8:24:45 PM

0/0

You can set the pageBaseType attribut to your type in the <pages> section in your configuration file.
/Fredrik Norm?n NSQUARED2
Microsoft MVP, MCSD, MCAD, MCT

Cornerstone

My Blog, ASP.Net 2.0 etc
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:

Web:
HowTo: Inherit from a common page class? - ASP.NET Forums And is there any way to set up a default page class for a site. I only want to specify an "Inherits" tag for pages that do NOT inherit from ...
Howto inherit from an exisiting webcontrol in VS 2005 You just create a class (vb sample) class myClass inherits ... To use it in your page, you can either use the @register directive in the ...
Howto inherit from an exisiting webcontrol in VS 2005 Reload this Page Howto inherit from an exisiting webcontrol in VS 2005 ... You just create a class (vb sample) class myClass inherits ...
EJB3 Cartridge Plugin - AndroMDA - EJB3 - HowTo Inheritance The following howto should give you a basic understanding on how to model .... Support for the table per class inheritance mapping strategy is optional in ...
HOWTO inherit structure | MagicDraw UML and SysML Plugin eSchool HOWTO inherit structure. Fri, 12/14/2007 - 10:42 — author. This tutorial trail shows how to inherit structure between abstract systems and concrete systems. ...
TheMSsForum.com >> Asp >> Howto inherit from an exisiting ... See the page nflhallofshame.com/database.aspx. I want the listbox to match the color scheme. Any help would be appr. Steve Tag: Howto inherit from an ...
VB Helper: HowTo: Provide design time support for a custom control ... VB Helper: HowTo: Provide design time support for a custom control in Visual Basic .NET. ... The property page classes inherit from ComponentEditorPage. ...
Qt-interest Archive - Re: Q_ENUMS: howto register 'external' enums Some of these will indirectly inherit from QObject themselves, so I don't want my QiGlobal class to inherit also, causing multiple ...
libstdc++-v3 HOWTO: Chapter 21 HOWTO for the libstdc++ chapter 21. ... While parts of the SGI STL are used in libstdc++-v3, their string class is ... Return to top of page or to the FAQ. ...
SourceForge.net: Files ... proc page missing * Classes.inc fixed bug 559488, too many root classes in ... class inheritance from diff package broken * howto.html updated many ...




Search This Site:










cannot login to the asp.net development server

redirecting using the button control

recursive redirect problem?

remote debugging not responding...?

skin/menu question

is this normal when using shared ssl...???

print module -how to?

how to use certificates...

formsauthentication authcookie question

could not connect to database

server.transfer and controlplaceholders

image button

registration control problem

session event handlers missing in global.asax

problem with mailmessage.attachments

uploading an image

asp.net 2.0 error using iis 5.x

please help me

problem to understand readme and copying the files to appropriate place

http handlers question

form id's gone after migration to 2.0 vs2005

webconfig - 2 databases selected off header

pages not found after fresh install on new web server

frames?

any reason why sitemap only allow one top sitemapnode?

radio button and master page problems.

how to generate a <colgroup> element for a html table

a question about performance....

basic setup of slqprovider - memberships and roles

screen scrape

 
All Times Are GMT