I am using multiple partial views on my View. on the left-hand side. I have some link button.
In middle, I have 2 partial views let us suppose Up and Down I m able to update the Up partial view now I want to update Down partial view on the click of the same link button
I am able to send only one UpdateTargetID in Ajax.ActionLink button but I want to update 2 Partial views on the click of the same button.
1) Is there any way I can pass more than one UpdateTargetID in Ajax.ActionLink or 2) I can return Multiple partial views in Home Controller or any other way as you suggested Please reply to me
Thanks, Everyone for replying Let me tell you what I have done in order to refresh multiple partial view on a single click This is the Action Link which I m using to click on Here I m using a OnSucess Function of this Action link in order to update, This Action link is on a partial view
<%= Ajax.ActionLink("Select", "Employee", new { Id = Employee.EmployeeID }, new AjaxOptions { UpdateTargetId = "EmployeeDiv", HttpMethod = "Post", OnSuccess = "function(){EmployeeHistory(-2," + Employee.EmployeeID.ToString() + ");}" })%>
这是我从部分观点呼吁的 j。
function EmployeeHistory(EmployeeID) {
var url = <%= Url.Action("PartialviewAction", "ControllerName") %>
$( #PartialviewDiv1 ).load(url, { Id: EmployeeID });
var url1 = <%= Url.Action("PartialviewAction", "ControllerName") %>
$( #PartialviewDiv2 ).load(url1, { Id: EmployeeID });
}
这两点是指数,我想更新。
<div id="Paritalview div1"><% Html.RenderPartial("PartialViewname1"); %></div>
<div id="Paritalview div2"><% Html.RenderPartial("PartialViewname2"); %></div>