Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 August 6th, 2012, 03:38 AM
Authorized User
Points: 233, Level: 4
Points: 233, Level: 4 Points: 233, Level: 4 Points: 233, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2011
Posts: 44
Thanks: 14
Thanked 0 Times in 0 Posts
Default Chapter 6: Base page

In chapter 6 you introduce a centralized base page for the sole purpose to avoid untitled pages.
Can you give me some more complex examples, maybe taken from your professional experience, of the advantages of a centralized base page ?

Thank you
Antonius
 
Old August 6th, 2012, 04:40 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

You can use a BasePage for many things you want centralized in your site. For example, as shown in the same chapter, you can use it to apply the theme based on the user's preference. You coud also use it to determine the selected menu item when you have a custom menu. For this, add a property such as SelecteedMenuItem. Pages in your site can then set this property to something like "Home", "About" or whatever, and the BasePage could then highlight the correct item, for example by setting a CSS class.

You could also use it for security where the base page looks at the current user and does something based on that information (such as displaying or hiding screen elemenets or changing their behavior).

This Google search:

https://www.google.com/#hl=en&output....net+base+page

brings up lots of useful example, including:

http://www.4guysfromrolla.com/articles/041305-1.aspx
http://stackoverflow.com/questions/2...ge-class-ideas
http://dotnetslackers.com/articles/a...age-Class.aspx

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:
arun_babu_a (August 20th, 2012)




Similar Threads
Thread Thread Starter Forum Replies Last Post
Base Page / Master Page Confusion fiddley ASP.NET 4 General Discussion 1 December 16th, 2011 09:01 AM
Base page TeaDrinkingGeek BOOK: Beginning ASP.NET 4 : in C# and VB 1 February 18th, 2011 11:37 AM
Creating a base page confusion Kerblamalot ASP.NET 3.5 Basics 4 February 3rd, 2010 04:16 AM
The base page in Appendix C has a problem thrylos97 BOOK: Beginning Spring Framework 2 ISBN: 978-0-470-10161-2 1 August 24th, 2009 04:05 AM





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