开发者

load a heavy view gradually

@{
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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜