Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<div class="table">
           @foreach (var item in Model)
           {    
              <div class="tr">
                  <div class="td">
                        <img src="@Html.DisplayFor(modelItem => item.ThumbnailUrl)" alt=""   

           class="thumbnailFloat" />
                    <span class="listTitle"><a href="@Url.RouteUrl(" default=", new { controller <br mode=" hold=" />        = " video=", action = " details=", id = item.VideoId, title = <br mode=">@item.Title</a></span><br />
                    <span class="postInfo">Posted by <a href="@Url.RouteUrl(" profile=", new {    <br mode=" hold=" />        controller = " index=", username = item.UserName })">@item.UserName</a> on 
        @Html.DisplayFor(modelItem => item.CreatedDateTime) | Views: @Html.DisplayFor(modelItem => 
         item.ViewCount) </span>
                    <div class="desc"> @Html.DisplayFor(modelItem => item.Description) </div>
                </div>
            </div>
        }
       </div> 

My controller

private KidsFundaDB db = new KidsFundaDB();

         //
         // GET: /Video/

         public ActionResult Index(int page = 1)
         {
           return View(db.VideoModels.OrderByDescending(v => v.VideoId).ToPagedList(page, 3));
         }
Posted
Updated 30-Jul-14 11:15am
v2

1 solution

For Pagination The following video was useful to me

https://www.youtube.com/watch?v=srN56uxw76s[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900