send data to partial view mvc code example
Example 1: mvc pass model to partial view
@model LetLord.Models.Tenant
<div class="row-fluid">
<div class="span4 well-border">
@Html.Partial("~/Views/Tenants/_TenantDetailsPartial.cshtml", Model)
</div>
</div>
Example 2: dynamically load partial view mvc
// partial view controller
public IViewResult LoadPartial() {
return PartialView("_login"); // name of the partial view
}
// view (with jquery)
$("#container").load("LoadPartial");