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
htmlHelper
HtmlHelperThe HTML helper.
partialViewName
stringThe 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
HtmlHelperThe HTML helper.
partialViewName
stringThe name of the partial view.
model
objectThe 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
HtmlHelperThe HTML helper.
partialViewName
stringThe name of the partial view.
model
objectThe model for the partial view.
viewData
ViewDataDictionaryThe 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
HtmlHelperThe HTML helper.
partialViewName
stringThe name of the partial view.
viewData
ViewDataDictionaryThe view data.