1 /* ****************************************************************************
\r
3 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5 * This software is subject to the Microsoft Public License (Ms-PL).
\r
6 * A copy of the license can be found in the license.htm file included
\r
7 * in this distribution.
\r
9 * You must not remove this notice, or any other, from this software.
\r
11 * ***************************************************************************/
\r
13 namespace System.Web.Mvc.Html {
\r
14 public static class RenderPartialExtensions {
\r
15 // Renders the partial view with the parent's view data and model
\r
16 public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName) {
\r
17 htmlHelper.RenderPartialInternal(partialViewName, htmlHelper.ViewData, null /* model */, htmlHelper.ViewContext.Writer, ViewEngines.Engines);
\r
20 // Renders the partial view with the given view data and, implicitly, the given view data's model
\r
21 public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName, ViewDataDictionary viewData) {
\r
22 htmlHelper.RenderPartialInternal(partialViewName, viewData, null /* model */, htmlHelper.ViewContext.Writer, ViewEngines.Engines);
\r
25 // Renders the partial view with an empty view data and the given model
\r
26 public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName, object model) {
\r
27 htmlHelper.RenderPartialInternal(partialViewName, htmlHelper.ViewData, model, htmlHelper.ViewContext.Writer, ViewEngines.Engines);
\r
30 // Renders the partial view with a copy of the given view data plus the given model
\r
31 public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName, object model, ViewDataDictionary viewData) {
\r
32 htmlHelper.RenderPartialInternal(partialViewName, viewData, model, htmlHelper.ViewContext.Writer, ViewEngines.Engines);
\r