سوال: فراخوانی پارشال ویو بکمک ajax

ساخت وبلاگ
سلام
من یک پارشال ویو دارم به شکل زیر

@model IEnumerable<Modal04.Models.User>




<h2>Main</h2>




<div class="container">
<table class="table" style="width:600px; margin-left:200px; background-color:aquamarine;">
<tr>
<th>
@Html.DisplayNameFor(model => model.UserName)
</th>
<th>
@Html.DisplayNameFor(model => model.Password)
</th>
<th></th>
</tr>


@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.UserName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Password)
</td>
<td>
<a class="btn btn-warning" onclick="Edit(@item.UsersId);">ویرایش</a>|
@Html.ActionLink("Details", "Details", new { id = item.UsersId }) |
@Html.ActionLink("Delete", "Delete", new { id = item.UsersId })
</td>
</tr>
}


</table>
</div>










public ActionResult ListUsers()
{
var list = db.Users.ToList();
return PartialView("MainTest", list);
}


<div class="jumbotron">
<h1>ASP.NET</h1>
<p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p>
<p><a href="https://asp.net" class="btn btn-primary btn-lg">Learn more &raquo;</a></p>
</div>
@Html.Action("ListUsers", "Users")

اما وقتی عملیلاتی(داده ای کم و زیاد میشود )انجام میشود باید یکبار index را رفرش کنم تا داده ها نمایش داده شود
اما میخواهم بدون انکه صفحه index را رفرش کنم دادها نمایش داده شود چکار باید کنم
باتشکر
تمپوs...
ما را در سایت تمپوs دنبال می کنید

برچسب : نویسنده : خنج tempos بازدید : 186 تاريخ : دوشنبه 12 شهريور 1397 ساعت: 7:06