@{
    int columnId = Html.CurrentColumnId();
    string kw = StringHelper.Format<string>(HttpContext.Current.Request.QueryString["kw"]);
    string[] pagePathArr = Html.PagePath().Split('/');
    int currentPage = StringHelper.Format<int>(Html.CustomViewParameter("page"));
    if (currentPage <= 0)
    {
        currentPage = 1;
    }
    PageInfo pageInfo = new PageInfo()
    {
        PageSize = 10,//每页显示10条数据
        CurrentPage = currentPage //当前页码，系统预设
    };
    var dataList = Html.InfoDataList(new { Table = "news" }, "title like @kw", new { kw = "%" + kw + "%" }, pageInfo);
    ViewBag.Path = "/product/Search/"; //PagebreakPartial分页文件用到
}
<div class="container padding-bottom-60">
    <ul class="breadcrumb">
        <li><a href="@Html.SiteUrl()"><span class="fa fa-home"> 首页</span></a></li>
        <li><a href="">新闻搜索</a></li>
    </ul>
    <ul class="news-list padding-top-10">
        @{int num = 0;
            foreach (var item in dataList)
            {
                num++;
                string url = Html.InfoDataUrl((int)item.ColumnId, (int)item.Id);
                string date = item.Thedate.ToString("yyyy-MM-dd");
                <li class="item">
                    <span class="title">
                        <a href="@url" target="_blank" title="@item.Title">@item.Title</a>
                    </span>
                    <span class="date">@date</span>
                </li>
            }
            if (num == 0)
            {
                <li class="line-height-2 padding-bottom-20 padding-top-20">
                    暂时没有找到匹配的记录，请更换一个关键词重新搜索!
                </li>
            }
        }
    </ul>
     @Html.Partial("PagebreakPartial", pageInfo)
</div>
<script>
    $("#input-search").val("@kw");
    $searchBtn.trigger("click");//触发搜索按钮，显示搜索框
</script>

