ViewResultBase Class

Represents a base class that is used to provide the model to the view and then render the view to the response.

Inheritance Hierarchy


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


Public MustInherit Class ViewResultBase _
    Inherits ActionResult
Dim instance As ViewResultBase
public abstract class ViewResultBase : ActionResult
public ref class ViewResultBase abstract : public ActionResult
type ViewResultBase =  
        inherit ActionResult 
public abstract class ViewResultBase extends ActionResult

The ViewResultBase type exposes the following members.


  Name Description
Protected method ViewResultBase Initializes a new instance of the ViewResultBase class.



  Name Description
Public property Model Gets the view data model.
Public property TempData Gets or sets the TempDataDictionary object for this result.
Public property View Gets or sets the IView object that is rendered to the response.
Public property ViewBag Gets the view bag.
Public property ViewData Gets or sets the view data ViewDataDictionary object for this result.
Public property ViewEngineCollection Gets or sets the collection of view engines that are associated with this result.
Public property ViewName Gets or sets the name of the view to render.



  Name Description
Public method Equals (Inherited from Object.)
Public method ExecuteResult When called by the action invoker, renders the view to the response. (Overrides ActionResult.ExecuteResult(ControllerContext).)
Protected method Finalize (Inherited from Object.)
Protected method FindView Returns the ViewEngineResult object that is used to render the view.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)



The ViewResultBase class is the abstract base class for both the ViewResult and PartialViewResult classes. The class contains methods for finding the view to be rendered and for executing the result. This class also contains properties that identify the view to be rendered, the name of the view, view data, temporary data, and a collection for view engines for the application.

Thread Safety

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

See Also


System.Web.Mvc Namespace