Class RenderPartialExtensions
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
htmlHelperHtmlHelperThe HTML helper.
partialViewNamestringThe 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
htmlHelperHtmlHelperThe HTML helper.
partialViewNamestringThe name of the partial view.
modelobjectThe 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
htmlHelperHtmlHelperThe HTML helper.
partialViewNamestringThe name of the partial view.
modelobjectThe model for the partial view.
viewDataViewDataDictionaryThe 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
htmlHelperHtmlHelperThe HTML helper.
partialViewNamestringThe name of the partial view.
viewDataViewDataDictionaryThe view data.