RazorViewEngine.CreatePartialView Method
Creates a partial view using the specified controller context and partial path.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
'Declaration Protected Overrides Function CreatePartialView ( _ controllerContext As ControllerContext, _ partialPath As String _ ) As IView 'Usage Dim controllerContext As ControllerContext Dim partialPath As String Dim returnValue As IView returnValue = Me.CreatePartialView(controllerContext, _ partialPath)
Parameters
- controllerContext
- Type: System.Web.Mvc.ControllerContext
The controller context.
- partialPath
- Type: System.String
The path to the partial view.
Partial views are reusable components of a view. Partial views are able to get the data to display from the ViewData object of the parent, or through the use of the model that was passed into the partial view. Because partial views are intended to be only a partial rendering of the view, there is no concept of a master view for partial views.
Partial views can use a different view engine than the view in which they are rendered.
Show: