Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Professional ASP.NET MVC 2
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 2nd, 2010, 10:54 AM
Registered User
 
Join Date: Dec 2010
Posts: 8
Thanks: 6
Thanked 2 Times in 2 Posts
Default Implementing the "Index" view Template (Ch1 page 51 figure 1-74)

Hello all,
I'm new to the the MVC and currently going through the tutorial in the book where I don't get the result that is displayed in figure 1-74 on page 52. When I run the application, I only see the "Upcoming" heading being displayed; no data from the database.

When I step though the code by debugging it, the "foreach" loop does not get executed. Any suggestion?

Thank you!
L.H
  #2 (permalink)  
Old December 2nd, 2010, 11:23 AM
Friend of Wrox
Points: 539, Level: 8
Points: 539, Level: 8 Points: 539, Level: 8 Points: 539, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2010
Location: Seattle
Posts: 106
Thanks: 1
Thanked 17 Times in 17 Posts
Default

Can you post your Index.aspx code here?

Also would like to see:

Index() method in DinnersController.cs

FindUpcomingDinners() method in DinnerRepository.cs btw, this code only looks for events that are in the future. Any events you have that that are in the past are ignored. So your code may be correct and it's just the data that is expired. If this is the case, change the dates of the events or create new events.
The Following User Says Thank You to flyinhawaiian For This Useful Post:
lagonave (December 2nd, 2010)
  #3 (permalink)  
Old December 2nd, 2010, 11:30 AM
Friend of Wrox
Points: 539, Level: 8
Points: 539, Level: 8 Points: 539, Level: 8 Points: 539, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2010
Location: Seattle
Posts: 106
Thanks: 1
Thanked 17 Times in 17 Posts
Default

Also, if you haven't already noticed. There a lot of errors in this chapter. Many have contributed to solutions in this forum. So be sure to search the forum when you get stuck. There's one particular post that lists nearly all the flaws.
Errata
The Following User Says Thank You to flyinhawaiian For This Useful Post:
lagonave (December 2nd, 2010)
  #4 (permalink)  
Old December 2nd, 2010, 11:37 AM
Registered User
 
Join Date: Dec 2010
Posts: 8
Thanks: 6
Thanked 2 Times in 2 Posts
Default Implementing the "Index" view templaate solution

Thank you so much for your quick and right on answer. I have changed the only the month current month as suggested and ran the application, I saw all my upcoming dinners.

Regards,
L.H
 


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
Differences between "view in browser" to design view Dan Cern BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 12 November 1st, 2009 02:32 AM
How to theme the "Browse" button of "FileUpload" control? varunbwj BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 14th, 2009 01:22 AM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 04:56 AM
Code not going as planned: "icicle" vs "savedinstancestate" joopthecat BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 May 3rd, 2009 03:09 PM
Question about "Empty Project" template. Pinny BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 1 March 27th, 2009 11:04 AM



All times are GMT -4. The time now is 09:29 AM.


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