473,804 Members | 3,909 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Nested Master Pages: Accessing Properties

I have two nested master pages, each with public properties. From my
content page, I am able to access properties from both pages using either
Master.Property Name (for the child master page) or
Master.Master.P ropertyName (for the parent master page). The solution
compiles and the HTML looks right, but my code has blue "error" underlines
wherever I type Master.Master.P ropertyName. When I hover over the
underlined code, I get the following message:

Reference required to assembly 'App_Web_appmai n.maste.6044e34 .4epngtbx,
Version=0.0.0.0 , Culture=neutral , PublicKey Token=null' containing the type
'ASP.masters_ap pmain_master'. Add one to your project.

AppMain_master is my parent master page.

Can anyone tell me how to get rid of this error?
Thanks!
Diane Y.
May 31 '06 #1
1 1650
Add a:

<@Reference VirtualPath="Yo urMaster.master " %>

This tells the ASP.NET compiler that you have a dependency upon the generated
class from that other file, thus the ASP.NET compiler will ensure your page
gets compiled with the appropriate reference.

-Brock
http://staff.develop.com/ballen

I have two nested master pages, each with public properties. From my
content page, I am able to access properties from both pages using
either Master.Property Name (for the child master page) or
Master.Master.P ropertyName (for the parent master page). The solution
compiles and the HTML looks right, but my code has blue "error"
underlines wherever I type Master.Master.P ropertyName. When I hover
over the underlined code, I get the following message:

Reference required to assembly
'App_Web_appmai n.maste.6044e34 .4epngtbx, Version=0.0.0.0 ,
Culture=neutral , PublicKey Token=null' containing the type
'ASP.masters_ap pmain_master'. Add one to your project.

AppMain_master is my parent master page.

Can anyone tell me how to get rid of this error?
Thanks!
Diane Y.

Jun 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2754
by: Joseph Ferris | last post by:
Hello, I am having an issue with page breaking that I hope someone will be able to help me with. Still a relative "newbie", and I thought this might be a good place to find some help. I have a complex FO that contains nested tables. There are a few places where my breaks are not being rendered, although other ones work fine. I've made an FO that can reproduce this behavior. It is: <?xml version="1.0" encoding="UTF-8"?>
4
2471
by: Steve Franks | last post by:
I have this cool nested master page scenario working great. However what is the correct way to be able to access a strongly typed property at the top level master from a content page that has a nested master page between the content page and the top level master? For example, assume the very top level master is called CompanyWide.master. And the nested master page is called DepartmentA.master, which inherits from CompanyWide master. ...
1
4555
by: dezza | last post by:
Hi, I am developing a web application that is a series of pages, rather like a wizard. Because all of the pages basically have the same navigation, and require the navigation buttons in the same part of every screen, I have put the navigation buttons on the Master Page. The Content Pages, when they load, are able to change the caption of the navigation buttons as required by accessing the properties of the Master Page.
2
2469
by: iturner100 | last post by:
Hi, I've been struggling with this one for a couple of hours without much joy. Basically, I've got a set of nested masterpages (3 as it happens). I'm dynamically generating a new page in code and want to be able to populate the ContentPlaceholders of the inner-most masterpage at run-time.
3
1708
by: Rolf Welskes | last post by:
Hello, for a large web site project we would like to use nested Master Pages. Unfortunely VS2005 is not able to show pages in design mode when nested Master pages are used. This has the consequence that also each content page cannot be used in design mode. It is impossible to design hundrets of pages in source mode without design
3
4095
by: vespaboy | last post by:
i need to access a <div runat="server"which sits in a master page which is itself nested in a master page. i've tried this code but it doesn't work: Page: Dim divStep1 As HtmlGenericControl = CType(Master.FindControl("divStep1"), HtmlGenericControl) Master page:
4
4021
by: evantay | last post by:
I'm using ASP.NET 2.0 with VS.NET 2005. I'm trying to access properties from my master pages within a page that inherits from that master page (a child page). However the values are always null. In my masterpage I have this: private bool m_AlreadyTested; public bool AlreadyTested { get { return m_AlreadyTested; }
6
9167
by: =?Utf-8?B?SmF5IFBvbmR5?= | last post by:
I am trying to access a Public property on a Master Page from a Base Page. On the content pages I have the MasterType Directive set up as follows: <%@ MasterType virtualpath="~/Master.master" %> On the Master Page I have a public property exposed: Public Property ErrorMessage() As String Get Return txtError.InnerText End Get
4
1600
by: daveh551 | last post by:
I've seen reference to Nested Master Pages in some of the documentation, but I haven't been successful in creating one in VS 2005 (Framework 2.0). I just did a search on it, and "How To: Walkthrough" on Master pages listed VS 2008 and Framework 3.5 as pre- requisites. If I do an "Add New Item" selecting "Master Page", the "Use MasterPage" check box is grayed out, so it won't let me create it in VS 2005. Is there a way to "trick it"? ...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10076
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4297
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.