Table of Contents

Class RenderPartialExtensions

Namespace
System.Web.Mvc.Html
Assembly
System.Web.Mvc.dll

Provides support for rendering a partial view.

public static class RenderPartialExtensions
Inheritance
RenderPartialExtensions
Inherited Members

Methods

RenderPartial(HtmlHelper, string)

Renders the specified partial view by using the specified HTML helper.

public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName)

Parameters

htmlHelper HtmlHelper

The HTML helper.

partialViewName string

The name of the partial view

RenderPartial(HtmlHelper, string, object)

Renders the specified partial view, passing it a copy of the current ViewDataDictionary object, but with the Model property set to the specified model.

public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName, object model)

Parameters

htmlHelper HtmlHelper

The HTML helper.

partialViewName string

The name of the partial view.

model object

The model.

RenderPartial(HtmlHelper, string, object, ViewDataDictionary)

Renders the specified partial view, replacing the partial view's ViewData property with the specified ViewDataDictionary object and setting the Model property of the view data to the specified model.

public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName, object model, ViewDataDictionary viewData)

Parameters

htmlHelper HtmlHelper

The HTML helper.

partialViewName string

The name of the partial view.

model object

The model for the partial view.

viewData ViewDataDictionary

The view data for the partial view.

RenderPartial(HtmlHelper, string, ViewDataDictionary)

Renders the specified partial view, replacing its ViewData property with the specified ViewDataDictionary object.

public static void RenderPartial(this HtmlHelper htmlHelper, string partialViewName, ViewDataDictionary viewData)

Parameters

htmlHelper HtmlHelper

The HTML helper.

partialViewName string

The name of the partial view.

viewData ViewDataDictionary

The view data.