Wrox Programmer Forums
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics 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 13th, 2008, 07:21 PM
Registered User
 
Join Date: Nov 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gymwalker
Default Page Theme not sticking...

I'm working through the Beginning ASP.NET 3.5 book chapter by chapter and I'm in Chapter 7 page 258...when I noticed that the Theme (either "darkgrey" or "monochrom") is not sticking when I click on a menu link. Actually it sticks (or works fine) for Home and Login...but does not work correctly for the other links like Review or Contact Us. If the PageTheme is set to "monochrome" in the web.config file and the Theme is set to "darkgrey" in the drop down box...if I click on any of the Review or About links I get a new page in the "monochrome" theme not the "darkgrey" theme. How do I fix this? Also, I looked at the code behind in the master page and it appears correct...I also looked at the source in the browser and it says 'theme="monochrome"'.

Thanks for your help,
Jim

Jim Walker
 
Old November 14th, 2008, 06:56 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Jim,

Do these pages inherit from the central BasePage class?

BTW: you're better off posting questions like this in the book's own forum category here at p2p.wrox.com. Makes it easier for everyone to find and answer them.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old November 14th, 2008, 03:08 PM
Registered User
 
Join Date: Nov 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gymwalker
Default

Imar:

Thanks for your response...actually I thought I was responding to the books forum...so forgive me messing that up.

These are the new folders/pages you had us create in Chapter 7...the About folder and Reviews folder...I created them from the 'master page' but I'm not sure how to make them 'inherit' from the central basepage? But that sounds like that could be what is wrong.

Please advise...

Thanks in advance!
Jim

P.S. Good Job and Great book!!!
Quote:
quote:Originally posted by Imar
 Hi Jim,

Do these pages inherit from the central BasePage class?

BTW: you're better off posting questions like this in the book's own forum category here at p2p.wrox.com. Makes it easier for everyone to find and answer them.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
Jim Walker
 
Old November 14th, 2008, 03:16 PM
Registered User
 
Join Date: Nov 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to gymwalker
Default

Imar:

I checked all the pages in the About and Reviews folder and they all have an Inherits= statement on line one...but the vaule is the name of each individual page...for example the About/Contact.aspx page has (Inherits="About_Contact")...I checked the Login page which is working correctly and it has (Inherits="Login")...so I'm not sure if there is something else I'm missing.

Thanks again,
Jim

Jim Walker
 
Old November 14th, 2008, 04:17 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Jim,

It's about the code in COde Behind.

Usually, you have something like this:

Public Class MyPage
     Inherits System.UI.Web.Page


That should be replaced with:

Public Class MyPage
     Inherits BasePage

Creating a base page and templates that use it by default is discussed extensively in chapter 6, most notably page 206 - 213.

Maybe you skipped a chapter? It's quite an important topic...

Imar




---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception of get theme JasonF430 ASP.NET 2.0 Basics 0 April 16th, 2008 01:31 AM
Setting Theme in Master Page rodmcleay General .NET 12 April 9th, 2008 05:24 AM
Theme Selector wont pick up other theme Tawanda BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 May 4th, 2007 08:44 AM
theme selector rav BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 February 12th, 2007 12:44 AM
page theme zhugeliang ASP.NET 2.0 Basics 1 January 9th, 2007 02:40 AM





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