开发者

load a heavy view gradually

开发者 https://www.devze.com 2023-03-06 09:11 出处:网络
@{ ViewBag.Title = \"Index\"; Layout = \"~/Views/Shared/_Layout.cshtml\"; } <h2> Index</h2> @{ using (var db = new PNUBOO开发者_运维知识库KIR.Models.KowsarSiteEntities())
@{
ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>
    Index</h2>
@{
    using (var db = new PNUBOO开发者_运维知识库KIR.Models.KowsarSiteEntities())
    {
        var queries = from n in db.vwGood
                      select n;
    <table>
          foreach (var q in queries)
            {
            <tr>
                <td>
                    @q.GoodCode
                </td>
                <td>
                    @q.GoodName
                </td>
                <td>
                    @q.GoodExplain1
                </td>
            </tr>                
        }
    </table>                    
    }    
}

queries.Count() is 4,000,000. but I don't want any pager how I can set it to load gradually.


Why not page it like twitter/slashdot? (A "Load More" button or using ajax to load more on the fly)

0

精彩评论

暂无评论...
验证码 换一张
取 消