[英]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 . 有关如何创建局部视图的更多信息,请参见此处和此处 。
Here is a great tutorial thats easy and quick: 这是一个很棒的教程,简单又快速:
http://www.joe-stevens.com/2011/05/30/asp-net-mvc-simple-server-side-ajax-paging-using-jquery/ http://www.joe-stevens.com/2011/05/30/asp-net-mvc-simple-server-side-ajax-paging-using-jquery/
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.