PartialViewResult Class

Visual Studio 2010

Represents a base class that is used to send a partial view to the response.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public class PartialViewResult : ViewResultBase

The PartialViewResult type exposes the following members.

Public methodPartialViewResultInitializes a new instance of the PartialViewResult class.

Public propertyTempDataGets or sets the TempDataDictionary object for this result. (Inherited from ViewResultBase.)
Public propertyViewGets or sets the IView object that is rendered to the response. (Inherited from ViewResultBase.)
Public propertyViewDataGets or sets the view data ViewDataDictionary object for this result. (Inherited from ViewResultBase.)
Public propertyViewEngineCollectionGets or sets the collection of view engines that are associated with this result. (Inherited from ViewResultBase.)
Public propertyViewNameGets or sets the name of the view to render. (Inherited from ViewResultBase.)

Public methodEqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodExecuteResultWhen called by the action invoker, renders the view to the response. (Inherited from ViewResultBase.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodFindViewReturns the ViewEngineResult object that is used to render the view. (Overrides ViewResultBase.FindView(ControllerContext).)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

An action result represents a command that ASP.NET performs on behalf of an action method. The PartialViewResult class implements the abstract ViewResultBase class and is used to render a partial view. This class contains methods for finding the partial view to render and for executing the result. This class also contains properties that identify the partial view to render, the name of the partial view, view data, temporary data, and a collection of view engines for the application.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions