I have partialviews inside a view. I am rendering the partial views using RenderAction Method
<div class="report">
@{ Html.RenderAction("ActionName", "ControllerName");}
</div>
in the partial view I have a post back where in I update the Model and send it to the partial view using
return PartialView("_PartialView");
The whole of the view gets refreshed
The viewmodel of the parent page is different to the viewmodel of the partialpages
Is there a way I can only refresh the partialview on the partialview postback ?
Try Url.Action instead of Html.RenderAction
<div class="report">
@{ Url.Action("ActionName", "ControllerName");}
</div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.