不能使用的NuGet PagedList ASP.NET MVC#查看 [英] Cannot use NuGet PagedList ASP.NET MVC # View

查看:250
本文介绍了不能使用的NuGet PagedList ASP.NET MVC#查看的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能使用下面的命名空间 PagedList 使用剃刀
@model PagedList.IPagedList< PhoneBook.Models.Contact> 在最上面的视图 Index.cshtml

I can't use the following namespace PagedList to use razor @model PagedList.IPagedList<PhoneBook.Models.Contact>in the topmost of view Index.cshtml

我已经安装PagedList,我已经使用下面的code在我的控制器

I already installed PagedList and i used already the code below in my Controller

 using PagedList;

有没有错误在控制器页面,但为什么ican't使用的名称空间中Index.cshtml(查看)?请帮助..

there's no error in the controller page but why ican't use the namespace in Index.cshtml (View)? Please help..

推荐答案

BuildStarted转诊或同时利用现有的,

BuildStarted referral or existing on at the same time use,

在控制器

using PagedList;
using PagedList.MVC;

在视图中使用

@model PagedList.IPagedList<PhoneBook.Models.Contact>
@using PagedList;
@using PagedList.MVC;

和使用分页

@Html.PagedListPager(Model, page => Url.Action("Index", new { page =
page }))

抱歉不好英语。

这篇关于不能使用的NuGet PagedList ASP.NET MVC#查看的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆