473,387 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.PropertyName (for the child master page) or
Master.Master.PropertyName (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.PropertyName. When I hover over the
underlined code, I get the following message:

Reference required to assembly 'App_Web_appmain.maste.6044e34.4epngtbx,
Version=0.0.0.0, Culture=neutral, PublicKey Token=null' containing the type
'ASP.masters_appmain_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 1625
Add a:

<@Reference VirtualPath="YourMaster.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.PropertyName (for the child master page) or
Master.Master.PropertyName (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.PropertyName. When I hover
over the underlined code, I get the following message:

Reference required to assembly
'App_Web_appmain.maste.6044e34.4epngtbx, Version=0.0.0.0,
Culture=neutral, PublicKey Token=null' containing the type
'ASP.masters_appmain_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
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...
4
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...
1
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...
2
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...
3
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...
3
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 =...
4
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....
6
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" %>...
4
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:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.