Solved

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

Posted on 2013-05-31
2
545 Views
Last Modified: 2015-12-08
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
0
Comment
Question by:finance_teacher
2 Comments
 
LVL 19

Accepted Solution

by:
Manoj Patil earned 500 total points
ID: 39211413
0
 

Author Comment

by:finance_teacher
ID: 39212879
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
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now