Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > BOOK: Professional ASP.NET 4.5 : in C# and VB
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 4.5 in C# and VB by Jason N. Gaylord, Christian Wenz, Pranav Rastogi, Todd Miranda, Scott Hanselman; ISBN: 978-1-1183-1182-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 16th, 2013, 12:06 PM
Authorized User
Points: 175, Level: 3
Points: 175, Level: 3 Points: 175, Level: 3 Points: 175, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2013
Location: St.Petersburg, Russia
Posts: 36
Thanks: 1
Thanked 4 Times in 4 Posts
Default Public properties with nested master pages

If I have "OuterMasterPage" that contains "InnerMasterPage" that contains "ContentPage", how can I get to public properties of the "OuterMasterPage" & "InnerMasterPage" from my "ContentPage"?

ContenPage has <%@ MasterType VirtualPath="~/InnerMasterPage.master" and can use Master.InnerMasterProperty syntax

I have added to InnerMasterPage <%@ MasterType VirtualPath="~/OuterMasterPage.master", but public properties of the OuterMasterPage are not available in the ContentPage;

Two <%@ MasterType directives in the ContentPage are not allowed

Is there a reasonable solution to this?

PS: I had a similar question on MCTS exam

Last edited by Oleg Kolpashchikov; July 30th, 2013 at 05:04 AM.
Reply With Quote
  #2 (permalink)  
Old July 17th, 2013, 05:28 PM
Authorized User
Points: 175, Level: 3
Points: 175, Level: 3 Points: 175, Level: 3 Points: 175, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2013
Location: St.Petersburg, Russia
Posts: 36
Thanks: 1
Thanked 4 Times in 4 Posts
Default Solution from 2004 still works

Found a solution on forum.asp.net

ContentPage needs <%@ Reference VirtualPath="~/OuterMaster.master" %> and now properties of the OuterMaster are available.
I tested it, of course, and it works.
Reply With Quote
  #3 (permalink)  
Old July 26th, 2013, 01:55 AM
Authorized User
Points: 42, Level: 1
Points: 42, Level: 1 Points: 42, Level: 1 Points: 42, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2013
Location: New York
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That is bit tricky i guess..
__________________
REI Coupon
Reply With Quote
  #4 (permalink)  
Old July 30th, 2013, 05:09 PM
jason.gaylord's Avatar
Wrox Author
Points: 45, Level: 1
Points: 45, Level: 1 Points: 45, Level: 1 Points: 45, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2013
Location: Northeastern Pennsylvania
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I'm glad you have solved this issue. Please let us know if you still have issues.
__________________
Jason Gaylord
http://jasongaylord.com
@jgaylord
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Nested master pages SouthendSupporter ASP.NET 3.5 Basics 1 March 3rd, 2011 10:15 AM
General question - Master Pages, Base pages, templates and OOP. flapjack BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 May 1st, 2010 10:33 AM
Problem in nested master pages. harsh.kintu ASP.NET 2.0 Professional 2 January 9th, 2007 10:04 AM
strange "errors" with nested master pages... thenoseknows ASP.NET 2.0 Professional 2 November 28th, 2006 05:28 PM
Public properties becoming obsolete BenCh BOOK: ASP.NET Website Programming Problem-Design-Solution 1 July 17th, 2005 09:29 PM



All times are GMT -4. The time now is 08:20 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.