简体   繁体   English

MVC Razor和AJAX分页

[英]MVC Razor & AJAX paging

Is there a way in which I can construct a MVC page such that, if required, I can pull the contents of it without the entire HTML frame. 有没有一种方法可以构造MVC页面,以便在需要时可以在没有整个HTML框架的情况下提取其内容。 Ie I want to be able to, if required, pull just the contents (for AJAX Paging) without the refreshing the entire page, but I want that to be possible too 也就是说,如果需要,我希望能够仅拉出内容(用于AJAX分页),而无需刷新整个页面,但是我也希望这样

@{
    ViewBag.Title = "ViewDevice";
}

<h2>ViewDevice</h2>

You can use partial view to implement reusable part of a view and render it in any view you want like this @Html.Partial("_ViewDevice") . 您可以使用局部视图来实现视图的可重用部分,并在所需的任何视图中呈现它,例如@Html.Partial("_ViewDevice")

For more information on how to create a partial view see here and here . 有关如何创建局部视图的更多信息,请参见此处此处

check it out: https://github.com/kibiluzbad/Ifa 检查一下: https : //github.com/kibiluzbad/Ifa

sample online demo: ifademo.apphb.com/ 示例在线演示:ifademo.apphb.com/

hope it helps 希望能帮助到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM