PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

error CS0246: 未能找到类型或命名空间名称“PageInfo”(是否缺... [复制链接]

1#
网站新闻列表页报错:
d:\data\web\yuqingsina.com\Templates\T9596\views\新闻中心\NewsList.cshtml(4): error CS0246: 未能找到类型或命名空间名称“PageInfo”(是否缺少 using 指令或程序集引用?)!

请问该如何解决?
分享 转发
TOP
2#

@{
    int columnId = Html.CurrentColumnId();//获取当前栏目id

    PageInfo pageInfo = new PageInfo()
    {
        PageSize = 10,//每页显示10条数据
        CurrentPage = (int)ViewBag.CurrentPage //当前页码,系统预设
    };
    string templateDirectory = ViewBag.TemplateDirectory;

}

@Html.Partial("bannerPartial")

<div class="container page-aboutus">
    @Html.Partial("leftNavPartial")
    @Html.Partial("BreadcrumbPartial")
    <div class="page-com-tit">
        @Html.GetColumnList().Where(c => c.Id == columnId).FirstOrDefault().Name
    </div>
    <ul class="m-newslist">
        @foreach (var item in Html.InfoDataList( new { ColumnId = Html.CurrentColumnId() }, null, null, pageInfo))

        {
            string url = Html.InfoDataUrl((int)item.ColumnId, (int)item.Id);
            string date = item.Thedate.ToString("yyyy-MM-dd");
            string title = item.Title;
            if (title.Length > 20)
            {
                title = title.Substring(0, 20) + "...";
            }
            <li>
                <a class="tit" href="@url">@title</a>
                <div class="date">
                    @date
                </div>
            </li>

        }
    </ul>
    @Html.Partial("PagebreakPartial", pageInfo)
</div>
TOP
发新话题 回复该主题