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 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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 Search this Thread Display Modes
  #1 (permalink)  
Old November 6th, 2011, 10:02 AM
Registered User
Points: 59, Level: 1
Points: 59, Level: 1 Points: 59, Level: 1 Points: 59, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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?
Reply With Quote
  #2 (permalink)  
Old November 7th, 2011, 08:46 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 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!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
ftaran (November 7th, 2011)
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
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



All times are GMT -4. The time now is 08:50 AM.


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