/// <summary> /// Renders the partial view with the specified name. /// </summary> /// <param name="htmlHelper">The HTML helper.</param> /// <param name="partialViewName">Name of the partial view.</param> /// <param name="model">The model.</param> /// <returns> /// Rendered partial view. /// </returns> public static System.Web.Mvc.MvcHtmlString Partial(this HtmlHelper htmlHelper, string partialViewName, object model) { return(PartialExtensions.Partial(htmlHelper, partialViewName, model, htmlHelper.ViewData)); }
/// <summary>Renders the specified partial view, passing it a copy of the current <see cref="T:System.Web.Mvc.ViewDataDictionary" /> object, but with the Model property set to the specified model.</summary> /// <param name="htmlHelper">The HTML helper.</param> /// <param name="partialViewName">The name of the partial view.</param> /// <param name="model">The model.</param> public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName, object model) { PartialExtensions.RenderPartialInternal(htmlHelper, partialViewName, htmlHelper.ViewData, model, htmlHelper.ViewContext.Writer); }
/// <summary> /// Renders the partial view with the specified name. /// </summary> /// <param name="htmlHelper">The HTML helper.</param> /// <param name="partialViewName">Name of the partial view.</param> /// <param name="viewData">The view data.</param> /// <returns> /// Rendered partial view. /// </returns> public static System.Web.Mvc.MvcHtmlString Partial(this HtmlHelper htmlHelper, string partialViewName, ViewDataDictionary viewData) { return(PartialExtensions.Partial(htmlHelper, partialViewName, null, viewData)); }
/// <summary>Renders the specified partial view, replacing its ViewData property with the specified <see cref="T:System.Web.Mvc.ViewDataDictionary" /> object.</summary> /// <param name="htmlHelper">The HTML helper.</param> /// <param name="partialViewName">The name of the partial view.</param> /// <param name="viewData">The view data.</param> public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName, ViewDataDictionary viewData) { PartialExtensions.RenderPartialInternal(htmlHelper, partialViewName, viewData, null, htmlHelper.ViewContext.Writer); }