Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET for Visual Studio 2015
This is the forum to discuss the Wrox book Beginning ASP.NET for Visual Studio 2015 by William Penberthy; ISBN: 978-1-119-07742-8
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET for Visual Studio 2015 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 Display Modes
  #1 (permalink)  
Old January 31st, 2017, 04:07 PM
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2017
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default More Chapter 6 problems

I downloaded the chapter 6 solution and started working through. When trying to run the Create page i get

Compiler Error Message: CS1503: Argument 1: cannot convert from 'string' to 'RentMyWrox.Models.Hobby'
Line 79: @foreach (string hobby in hobbyList)
Line 80: {
Line 81: string checkedText = Model.Hobbies.Contains(hobby) ? "checked" : string.Empty;
Line 82: <span>
Line 83: <input name="hobbies" value="@hobby" type="checkbox" @checkedText/>

I then tried starting from the downloaded chapter 5 solution only to find the controller folder missing !!!!! - helpful

Does anyone have a solution that works for chapter 6?
I'm losing the will to live with this book and dont see how you can learn from it when you just expecting more and more errors!
Are refunds available
Reply With Quote
  #2 (permalink)  
Old February 19th, 2017, 08:41 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Experiencing same issue for Chapter 6

I also had the exact same error for this chapter and unfortunately, can't seem to to rectify it e.g. simply commenting out the offending code causes problems with the build elsewhere.

The MVC code itself is complex in any case and I wouldn't expect to get the exact same successful build outcome every time. The shame here is that this chapter is the first one to move away from the web forms approach that sets the book in motion and concentrate on the MVC pattern - hence an immediate problem is rather unfortunate, i'd obviously acquired the book to learn about the technique so am definitely not an expert.

It is a large undertaking to write a book like this which is otherwise very well put together. Hopefully a resolution will surface soon.
Reply With Quote
  #3 (permalink)  
Old September 10th, 2017, 03:42 PM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2017
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default This book should be taken off the market!!

Big problems with Ch5 and now I see others having endless problems with Ch6!
This is appalling!
This book should never have got to the stage of publication!
If the publishers had any sense of moral responsibility they would provide refunds!
Reply With Quote
  #4 (permalink)  
Old October 9th, 2017, 10:30 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2017
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Fixed code issue in Chapter 6

I was able to solve the code issue in Chapter 6 (page 193) by checking for null for Model. This works for /Edit and /Create controllers.

string checkedText = string.Empty;
if (Model != null)
{
checkedText = Model.Hobbies.Contains(hobby)
? "checked"
: string.Empty;
}


http://localhost:64962/UserDemographics/Create
http://localhost:64962/UserDemographics/Edit/1


-Murali.
Reply With Quote
Reply


Thread Tools
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
Chapter 9 Problems eyadams BOOK: Beginning SharePoint 2013 Development 0 January 17th, 2014 08:48 PM
More Chapter 4 problems joeradtke BOOK: Building PHP Applications with Symfony, CakePHP, and Zend Framework 0 April 10th, 2011 07:08 PM
Yet more Chapter 4 problems Putter BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 3 March 29th, 2007 12:37 AM



All times are GMT -4. The time now is 03:18 PM.


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