P. 1
MVC Music Store - Tutorial - V2.0

MVC Music Store - Tutorial - V2.0

|Views: 13|Likes:
Published by kingshuk_paul

More info:

Published by: kingshuk_paul on Jun 04, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/04/2011

pdf

text

original

The Store Browse page is functional, but doesn’t look very good. We can update the page to show the

albums in a better layout by updating the view code (found in /Views/Store/Browse.cshtml) as follows:

MVC Music Store Tutorial v2.0 – http://mvcmusicstore.codeplex.com – Tutorial under Creative Commons Attribution 3.0 License
Page 142

@model MvcMusicStore.Models.Genre

@{

ViewBag.Title = "Browse Albums";

}


@Model.Name Albums

Here we are making use of Url.Action rather than Html.ActionLink so that we can apply special formatting
to the link to include the album artwork.

Note: We are displaying a generic album cover for these albums. This information is stored in the database
and is editable via the Store Manager. You are welcome to add your own artwork.

Now when we browse to a Genre, we will see the albums shown in a grid with the album artwork.

MVC Music Store Tutorial v2.0 – http://mvcmusicstore.codeplex.com – Tutorial under Creative Commons Attribution 3.0 License
Page 143

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->