Wrox Programmer Forums
| 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 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
  #1 (permalink)  
Old March 5th, 2015, 11:46 AM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2015
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Themes problem

I just finished the themes part with the dropdownlist. the problem is the only theme that is working is monochrome. i verified the code and it s exactly as in the book. when the page loads monochrome is preselected and loads. when i try to select darkgrey a postback is made and the "darkgrey" in the ddl doesn't remain selected instead monochrome reselects itself. what code should remain in the web.config file at the <pages> tag? this is what i have now "<pages theme="DarkGrey"></pages>" but still monochrome only works. please help!

LE: The "Monocrome" theme remains selected always in the DDL but if i load a page from the demos folder it has the darkgrey skin even though the "monchrome" is selected...

Last edited by knutz0r; March 5th, 2015 at 12:06 PM..
  #2 (permalink)  
Old March 7th, 2015, 05:02 PM
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,

Have you tried debugging your code? Can you see the cookie being set? Maybe this helps?

Chapter 6 - localhost Cookies Issue

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!
  #3 (permalink)  
Old March 10th, 2015, 10:54 AM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2015
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

actualy it doesn t work on chrome but on IE works just fine. lol
  #4 (permalink)  
Old March 11th, 2015, 11:11 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

It might be a cookie setting then. Try clearing your cookies in Chrome (in case you had an old cookie with outdated information) and check if you have any cookie blockers installed.

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!
  #5 (permalink)  
Old March 12th, 2015, 11:26 AM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2015
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i had ad block. THANK YOU VERY MUCH! I REALLY APRECIATE!
  #6 (permalink)  
Old March 19th, 2015, 03:24 AM
Authorized User
Points: 42, Level: 1
Points: 42, Level: 1 Points: 42, Level: 1 Points: 42, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2014
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default same Problem

I had the same problem, does we have remove cookies every time...to get rid of this problem...?
  #7 (permalink)  
Old March 19th, 2015, 12:19 PM
Registered User
Points: 15, Level: 1
Points: 15, Level: 1 Points: 15, Level: 1 Points: 15, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2015
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

mine works fine now. i have another problem now... at chapter nine nothing works until now. i\m at page 310 by now but the contact.aspx doesn t work at all. since i started making the contact form control and added it to the page i get this error:
Quote:
Server Error in '/' Application.

WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).
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.InvalidOperationException: WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).

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:



[InvalidOperationException: WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).]
System.Web.UI.ClientScriptManager.EnsureJqueryRegi stered() +2280926
System.Web.UI.WebControls.BaseValidator.RegisterUn obtrusiveScript() +10
System.Web.UI.WebControls.BaseValidator.OnPreRende r(EventArgs e) +9639589
System.Web.UI.Control.PreRenderRecursiveInternal() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint
  #8 (permalink)  
Old March 20th, 2015, 10:51 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

You don't have to clear your cookies at all, unless you stored a value earlier that no longer matches the theme.

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!
  #9 (permalink)  
Old March 20th, 2015, 10:54 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

You must be using a more recent version of VS than the book expects. Things have changed quite a bit between versions, so you need to either provide the jQuery mapping or disable unobtrusive validation by adding the following appSetting to web.config:

Code:
<appSettings>
  <add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appSettings>
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!
  #10 (permalink)  
Old March 28th, 2015, 10:52 PM
Authorized User
Points: 146, Level: 2
Points: 146, Level: 2 Points: 146, Level: 2 Points: 146, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2015
Location: Dhaka, Bangladesh
Posts: 34
Thanks: 3
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by knutz0r View Post
actualy it doesn t work on chrome but on IE works just fine. lol
You should try with another browser which suit best.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Themes question janilane BOOK: Beginning ASP.NET 4.5 : in C# and VB 5 May 29th, 2013 11:29 AM
Themes SP2010Dude BOOK: Beginning ASP.NET 4 : in C# and VB 1 September 17th, 2010 02:01 AM
Use Themes? the.pi.man ASP.NET 2.0 Basics 2 March 7th, 2007 08:44 AM
Themes bmains ASP.NET 2.0 Basics 2 August 2nd, 2004 08:48 AM





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