Link to home
Start Free TrialLog in
Avatar of finance_teacher
finance_teacher

asked on

ASP.Net MVC 4 C# -- Details Paging (Previous/Next)

How can I add "Previous/Next" buttons to the below
Details.cshtml code so only "Classic" Genre
items can be viewed ?
------------------------------------------------------
Steps
 1. run MvcMusicStore APP
 2. click on the "Classic" Genre
 3. below \Views\Store\GenreMenu.cshtml displays

      @model IEnumerable<MvcMusicStore.Models.Genre>
      <ul id="categories">
          @foreach (var genre in Model)
          {
        <li>@Html.ActionLink(genre.Name,
                "Browse", "Store",
                new { Genre = genre.Name }, null)
        </li>
          }
      </ul>
 4. click on an item
 5. below \Views\Store\Details.cshtml displays
------------------------------------------------------

@model MvcMusicStore.Models.Album

@{
    ViewBag.Title = "Album - " + Model.Title;
}

<h2>@Model.Title</h2>

<p>
    <img alt="@Model.Title" src="@Model.AlbumArtUrl" />
</p>


<div id="album-details">
    <p>
        <em>Genre:</em>
        @Model.Genre.Name
    </p>
    <p>
        <em>Artist:</em>
        @Model.Artist.Name
    </p>
    <p>
        <em>Price:</em>
        @String.Format("{0:F}", Model.Price)
    </p>
    <p class="button">
        @Html.ActionLink("Add to cart", "AddToCart",
        "ShoppingCart", new { id = Model.AlbumId }, "")
    </p>
</div>
------------------------------------------------------
Something like the below, but want as easy as possible
  ** http://stackoverflow.com/questions/1522622/creating-a-detailsview-pager-in-asp-net-mvc
  ** http://stackoverflow.com/questions/9496837/go-to-next-record-from-asp-net-mvc-details-view
  ** http://stackoverflow.com/questions/13298605/filter-and-pagination-in-mvc-4
ASKER CERTIFIED SOLUTION
Avatar of Manoj Patil
Manoj Patil
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of finance_teacher
finance_teacher

ASKER

Below are two links I found.
Do you have any other links ?

http://forums.asp.net/t/1707072.aspx/1
http://en.webdiyer.com/MvcPager