Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Referencing UserControl on a master page when using a Base class for all pages

Reply
Thread Tools

Referencing UserControl on a master page when using a Base class for all pages

 
 
SMH SMH is offline
Junior Member
Join Date: May 2009
Posts: 1
 
      05-07-2009
Hi All,

I'm rather stuck on this one!

Setup is as follows:

- MasterPage contains a UserControl, which has some public properties.
- I want to set the properties from my base class, which all my pages derive from

To complicate matters further, I will need to use multiple master pages for the site (braqnding depends on the logged in user).

I started off using Page.Master.FindControl("NameOfUserControl") but then what type is the control? My baseclass page, and indeed the pages are not aware of the CustomControl on the page or its type.

Any advice much appreciated!

Tar,
Simon.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl). murl ASP .Net 0 03-27-2007 09:30 PM
Using Master Pages and Base Pages =?Utf-8?B?RG9u?= ASP .Net 1 09-12-2006 01:32 PM
reference master page class from content page base class? Managed Code ASP .Net 3 07-31-2006 04:39 PM
web usercontrol + delegates or specialised usercontrol base class info@record-play.com ASP .Net 0 06-23-2006 09:41 AM
Cross Page Post Back When Using Mixture of Master Pages and Non-Master Pages Jason@webbit.com ASP .Net 1 05-16-2006 02:00 PM



Advertisments