Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 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 July 30th, 2009, 12:13 PM
Registered User
 
Join Date: Jul 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 11

Can someone explain to me why the Fan profile page loses the theme set on the profile when hitting the 'Save' button? If I set my profile to WroxBlue, I get the blue theme on all my pages, except after hitting the 'Save' button, and the Server.Transfer call is executed. Moving to a different page immediately shows the blue theme again. Thanks.
 
Old July 30th, 2009, 05:15 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 there,

I don't have the book so I don't know about the actual implementation, but it could be by design. A Click handler of a button fires quite late in the page's life cycle. A theme on the other hand needs to be set very early in the process. So, if you collect the theme during a postback, you're too late to set it for the current request.

I dealt with the same problem in my book Beginning ASP.NET 3.5 in C# and VB.NET by forcing a redirect to the same page after the theme was stored. This causes a new request which allows you to apply the theme in the early staages of the page life cycle.

Hope this helps,

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter-11 Carlw BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 October 16th, 2008 02:08 PM
Chapter 11 Moorish BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 11 June 4th, 2008 04:57 PM
chapter 11 figure 11-7 relative positioning pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 November 29th, 2007 06:11 AM
Chapter 11 kappa3 Wrox Book Feedback 0 October 8th, 2003 11:21 AM





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