Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 6th, 2011, 10:02 AM
Registered User
 
Join Date: Nov 2011
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
Default cant access masterpage attributes from the baspage file

why is it that i can access the BasePage attributes from the MasterPage code behind file but i cant access the MasterPage attributes from the BasePage file?
 
Old November 7th, 2011, 08:46 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
why is it that i can access the BasePage attributes from the MasterPage code behind file
Can you? Without writing custom code, you don't have access to the custom BasePage, only to the general System.Web.UI.Page class.

Quote:
but i cant access the MasterPage attributes from the BasePage file?
You can from an ASPX page. Search Google for "MasterPageType" and you'll find examples on accessing the Master Page in a strongly type way. Alternatively you can use FindControl to find controls in the Master Page from a Page or your custom BasePage.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
ftaran (November 7th, 2011)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Please hepl, how can I access the masterpage usercontrol ysfkay ASP.NET 3.5 Basics 4 May 16th, 2010 07:34 PM
Access MasterPage control in contentpage bhadrinath.medi ASP.NET 2.0 Professional 1 November 10th, 2009 05:23 PM
How to access Menu in MasterPage from Content mohan.raju ASP.NET 2.0 Professional 0 October 12th, 2006 03:29 AM
Masterpage to include a javscript file whatagamble ASP.NET 2.0 Basics 0 March 19th, 2006 01:09 PM
Access Column Attributes ~Bean~ ADO.NET 0 November 16th, 2005 09:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.