Table of Contents

Class PartialExtensions

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

Represents the functionality to render a partial view as an HTML-encoded string.

public static class PartialExtensions
Inheritance
PartialExtensions
Inherited Members

Methods

Partial(HtmlHelper, string)

Renders the specified partial view as an HTML-encoded string.

public static MvcHtmlString Partial(this HtmlHelper htmlHelper, string partialViewName)

Parameters

htmlHelper HtmlHelper

The HTML helper instance that this method extends.

partialViewName string

The name of the partial view to render.

Returns

MvcHtmlString

The partial view that is rendered as an HTML-encoded string.

Partial(HtmlHelper, string, object)

Renders the specified partial view as an HTML-encoded string.

public static MvcHtmlString Partial(this HtmlHelper htmlHelper, string partialViewName, object model)

Parameters

htmlHelper HtmlHelper

The HTML helper instance that this method extends.

partialViewName string

The name of the partial view to render.

model object

The model for the partial view.

Returns

MvcHtmlString

The partial view that is rendered as an HTML-encoded string.

Partial(HtmlHelper, string, object, ViewDataDictionary)

Renders the specified partial view as an HTML-encoded string.

public static MvcHtmlString Partial(this HtmlHelper htmlHelper, string partialViewName, object model, ViewDataDictionary viewData)

Parameters

htmlHelper HtmlHelper

The HTML helper instance that this method extends.

partialViewName string

The name of the partial view.

model object

The model for the partial view.

viewData ViewDataDictionary

The view data dictionary for the partial view.

Returns

MvcHtmlString

The partial view that is rendered as an HTML-encoded string.

Partial(HtmlHelper, string, ViewDataDictionary)

Renders the specified partial view as an HTML-encoded string.

public static MvcHtmlString Partial(this HtmlHelper htmlHelper, string partialViewName, ViewDataDictionary viewData)

Parameters

htmlHelper HtmlHelper

The HTML helper instance that this method extends.

partialViewName string

The name of the partial view to render.

viewData ViewDataDictionary

The view data dictionary for the partial view.

Returns

MvcHtmlString

The partial view that is rendered as an HTML-encoded string.