Wrox Programmer Forums
|
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 June 21st, 2010, 09:34 PM
Registered User
 
Join Date: Jun 2010
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
Default Theme won't change in new content page

Hello PPL!
I have just started chapter 9, and wanted to play around so i added a new web form called defualt2.aspx, lang is c# and i selected the masterpage(only 1 masterpage exist) for that new web form, so its actually a content page.
without editing the page, i chose to 'view in browser', and the page came fine in Monochrome theme.

But when tried to change theme, i could saw that a post back occurs, but the theme will not change.
By going to the home page, I got the wellcome page, and there it all worked fine, and themes changed well.

I don't get it, and i think it has to do with the web.config file.
there is the following line there:
Code:
 <pages theme="Monochrome">
I tried to remove the theme attribute but then the the browser brought a page with the following error in the browser:
""""""""""""""
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

""""""""""""""
Any one has a clue what am i doing wrong?

thank u guys for any answer!
 
Old June 21st, 2010, 10:03 PM
Registered User
 
Join Date: Jun 2010
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Well, i found the problem.
I've decided not to delete my message, if any one else has the same problem.
Here is the solution:
I reinstalled VS2010,and as a result, did not find the automatic way of adding web forms that already contains the next line in their code behind file:
public partial class Default2 : BasePage

instead, the original line showed which is:
public partial class Default2 : System.Web.UI.Page

So, it should be :public partial class Default2 : BasePage.

Good day 2 u all!





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Change the page content Per User bex ASP.NET 2.0 Professional 9 January 16th, 2009 03:40 PM
Page Theme not sticking... gymwalker ASP.NET 3.5 Basics 4 November 14th, 2008 04:17 PM
How i can change the theme(skin) of my form? sara_21 C# 2 April 8th, 2007 03:30 PM
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.