Wrox Programmer Forums
|
BOOK: Professional ASP.NET MVC 2
This is the forum to discuss the Wrox book Professional ASP.NET MVC 2 by Jon Galloway, Scott Hanselman, Phil Haack, Scott Guthrie, Rob Conery; ISBN: Professional ASP.NET MVC 2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 2 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 September 26th, 2010, 02:30 PM
Registered User
 
Join Date: Sep 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Handling Edit Errors (page 68)

I have got as far page 68 where the illustration shows that ommitting the Title is flagged as an error handled by the TryUpdateModel() helper method. However when I try leaving out the Title and attempt to Save, I get an exception occur in the NerdDinner Designer.cs class:

{
OnTitleChanging(value);
ReportPropertyChanging("Title");
_Title = StructuralObject.SetValidValue(value, false);
ReportPropertyChanged("Title");
OnTitleChanged();
}

which says that value cannot be null

Can anybody help please? Thanks
 
Old September 27th, 2010, 02:15 PM
Registered User
 
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Are you debugging ?

Hi,
i had a similiar effect but only when Debugging the application. When running the application i did not get such error anymore.

What is the class Designer.cs ?
 
Old September 27th, 2010, 06:14 PM
Registered User
 
Join Date: Sep 2010
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks, Yes I am debugging. The Designer class is the auto generated class created when the entity .edmx file is created.
 
Old October 11th, 2010, 04:33 PM
Friend of Wrox
 
Join Date: Oct 2010
Posts: 106
Thanks: 1
Thanked 17 Times in 17 Posts
Default

It's an unhandled exception warning (not an error). Just press F5 to continue.

You if it really bothers you, you can turn off this feature completely or for a specific namespace. In VS2010, select "Debug", "Exceptions", expand "Common Language Runtime Exceptions", uncheck "User-unhandled" box for the System.Data item.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Usage conventions (pp 67-68) MichaelRed BOOK: Professional C# 2008 ISBN: 978-0-470-19137-8 2 February 5th, 2009 08:47 PM
Ch 15 Try It Out, Handling Global Errors, p.583 VictorVictor BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 February 26th, 2006 10:50 PM
handling script errors using vb web browser state Beginning VB 6 3 January 19th, 2006 09:01 AM
handling all types of errors kliu9 Excel VBA 2 March 9th, 2005 01:06 PM





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