Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | 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 9th, 2011, 10:38 PM
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2011
Location: Manila (US Citizen)
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default Cant Find Dark Green

Hi I am a newbie please bear with me,

I have succesfully done all the exercises in the book until the end of chapter six. Now I try to load the pade and I get the error below. I have copied the code from the sample chapters to my application but the same message keeps showing.

What am I doing wrong?

Server Error in '/Site' Application.
--------------------------------------------------------------------------------

Theme 'Dark Grey' cannot be found in the application or global theme directories.
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.Web.HttpException: Theme 'Dark Grey' cannot be found in the application or global theme directories.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[HttpException (0x80004005): Theme 'Dark Grey' cannot be found in the application or global theme directories.]
System.Web.Compilation.ThemeDirectoryCompiler.GetT hemeBuildResultType(String themeName) +934
System.Web.Compilation.ThemeDirectoryCompiler.GetT hemeBuildResultType(HttpContext context, String themeName) +73
System.Web.UI.Page.InitializeThemes() +9003430
System.Web.UI.Page.PerformPreInit() +38
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +328




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237
Reply With Quote
  #2 (permalink)  
Old November 9th, 2011, 11:12 PM
Friend of Wrox
Points: 547, Level: 8
Points: 547, Level: 8 Points: 547, Level: 8 Points: 547, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

Hi Derrick,
The error message said you have not Theme's by "Dark Gray" name. As i know the correct name is 'DarkGray'(whitout space) in resource in the book. Please look at Theme folder and and look for right name of theme.
I hope this help you.
__________________
Please excuse me for poor and bad English.
Reply With Quote
  #3 (permalink)  
Old November 9th, 2011, 11:56 PM
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2011
Location: Manila (US Citizen)
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default Cant Find Dark Grey

Thanks Morteza

My Solution Explorer shows:
App_Themes
Folder> DarkGrey
Folder> Images
SubFolder> Header.jpg
File> DarkGrey.css
The same folders and files for Monochrome are also shown similar to this in the App_Themes folder.

Please note "Grey" is shown not "Gray" and I am using Visual Studio Ultimate?
Reply With Quote
  #4 (permalink)  
Old November 10th, 2011, 12:01 AM
Friend of Wrox
Points: 547, Level: 8
Points: 547, Level: 8 Points: 547, Level: 8 Points: 547, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

OK you should use 'DarkGrey' in your code instead of 'Dark Grey'(with space).
any doubt please comment.
__________________
Please excuse me for poor and bad English.
Reply With Quote
  #5 (permalink)  
Old November 10th, 2011, 12:09 AM
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2011
Location: Manila (US Citizen)
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I have no spaces between the name "DarkGrey". Even if I try to run the code from the Chapter six source file downloaded with the book I get the same message?
Reply With Quote
  #6 (permalink)  
Old November 10th, 2011, 12:14 AM
Friend of Wrox
Points: 547, Level: 8
Points: 547, Level: 8 Points: 547, Level: 8 Points: 547, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

Quote:
Exception Details: System.Web.HttpException: Theme 'Dark Grey' cannot be found in the application or global theme directories.
This error said that : you use 'Dark Grey' in your code. Did you use it in :
Code:
switch (Page.Theme.ToLower())
{
case “darkgrey”:
Menu1.Visible = false;
TreeView1.Visible = true;
break;
default:
Menu1.Visible = true;
TreeView1.Visible = false;
break;
}
?
__________________
Please excuse me for poor and bad English.
Reply With Quote
  #7 (permalink)  
Old November 10th, 2011, 12:16 AM
Friend of Wrox
Points: 547, Level: 8
Points: 547, Level: 8 Points: 547, Level: 8 Points: 547, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

also in web.config file check this :
Code:
<pages theme=”DarkGrey”>
...
</pages>
Did you enter DarkGrey like the theme name in Theme folder?
__________________
Please excuse me for poor and bad English.
Reply With Quote
  #8 (permalink)  
Old November 10th, 2011, 12:24 AM
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2011
Location: Manila (US Citizen)
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default

MasterPage Code:

<asp:DropDownList ID="ThemeList" runat="server" AutoPostBack="True">
<asp:ListItem>Monochrome</asp:ListItem>
<asp:ListItem>DarkGrey</asp:ListItem>

Web Config = <system.web>
<pages theme="Monochrome" styleSheetTheme="Monochrome"/>
The book says this is the default page

I cant see anywhere there is a space???
Reply With Quote
  #9 (permalink)  
Old November 10th, 2011, 12:25 AM
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2011
Location: Manila (US Citizen)
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default

P.S.

Am using Visual Basic not C#
Reply With Quote
  #10 (permalink)  
Old November 10th, 2011, 12:32 AM
Friend of Wrox
Points: 547, Level: 8
Points: 547, Level: 8 Points: 547, Level: 8 Points: 547, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

In 'Edit' menu select 'Find and Replace' sub-menu and then select 'Find in Files'; In Window that appears in 'Find what' field type 'Dark Grey' and for look in : select Entire solution and click Find all.
__________________
Please excuse me for poor and bad English.
Reply With Quote
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
Pg 16 Green Arrow? Astrocloud BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 5 March 17th, 2008 09:34 AM
Green spinning wheel kavyen Reporting Services 0 October 17th, 2006 02:09 PM



All times are GMT -4. The time now is 02:59 PM.


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