Skip to main content

ASP.NET MVC 1.0 Website Programming: Problem - Design - Solution

ASP.NET MVC 1.0 Website Programming: Problem - Design - Solution

Nick Berardi, Al Katawazi, Marco Bellinaso

ISBN: 978-0-470-41095-0

Jun 2009

552 pages

Select type: Paperback

Product not available for purchase

Description

Perfectly suited to the innovative Problem ? Design ? Solution approach, ASP.NET MVC is a new development model that separates code for the data, look, and business processes of a Web site. This nuts-and-bolts guide thoroughly covers creating a Web site with MVC and discusses solving the most common problems that you may encounter when creating your first application or trying to upgrade a current application. The material is based on the highly praised and widely used ?TheBeerHouse? ASP.NET Starter Kit that was developed in the bestselling ASP.NET 2.0 Website Programming: Problem?Design?Solution. Additional coverage includes registration and membership systems and user-selectable themes; content management systems for articles and photos; polls, mailing lists, and forums; e-commerce stores, shopping carts, and order management with real-time credit card processing, and more.
Introduction.

Chapter 1: Introducing the Project: TheBeerHouse.

Chapter 2: Introducing the ASP.NET Model-View-Controller (MVC).

Chapter 3: Developing the Site Design.

Chapter 4: Planning an Architecture.

Chapter 5: Membership and User Profiling.

Chapter 6: News, Article, and Blog Management.

Chapter 7: Opinion Polls.

Chapter 8: Newsletters.

Chapter 9: Forums.

Chapter 10: E-commerce Store.

Chapter 11: Localizing the Site.

Chapter 12: Deploying the Site.

Index.

TheBeerHouse MVC – May 21, 2009 version
The primary download site for this code is http://thebeerhouse.codeplex.com/. We mirror the code here on wrox.com for your convenience, but you should check CodePlex for occasional updates.
Download
ChapterPageDetailsDatePrint Run
25Typo in Text
NHiberante

Should be

NHibernate
7/27/09

39Error in Code
On Page 39 the code:

RedirectToRouteResult.Values["action"]

is wrong. It should be:

RedirectToRouteResult.RouteValues["action"]

Thus the Test on page 39 written correcly is:

[Test]
public void Register_Can_Successfully_Register_New_User()
{
var ac = new AccountController();
var results = ac.Register(username, email, question, answer, password);
Assert.IsNotNull(results);
Assert.IsInstanceOfType(typeof(RedirectToRouteResult), results);
var typedResults = results as RedirectToRouteResult;
Assert.AreEqual("Index", typedResults.RouteValues["action"], "Wrong action");
Assert.AreEqual("Home", typedResults.RouteValues["controller"], "Wrong controller");
}
08/04/2010

41Error in Code
The code:

Assert.AreEqual("Index", typedResults.Values["action"], "Wrong action"); Assert.AreEqual("Home", typedResults.Values["controller"], "Wrong controller");

should be changed to:

Assert.AreEqual("Index", typedResults.RouteValues["action"], "Wrong action");
Assert.AreEqual("Home", typedResults.RouteValues["controller"], "Wrong controller");
08/06/2010

109Error in Text
DESIGNING

Should be

Designing
7/8/09

312Error in Code
Error:

Assert.AreEqual("Index", typedResults.Values["action"], "Wrong action"); Assert.AreEqual("Home", typedResults.Values["controller"], "Wrong controller");

should be changed to:

Assert.AreEqual("Index", typedResults.RouteValues["action"], "Wrong action");
Assert.AreEqual("Home", typedResults.RouteValues["controller"], "Wrong controller");
08/04/2010