Table of Contents

Class WebFormView

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Represents the information that is needed to build a Web Forms page in ASP.NET MVC.

public class WebFormView : BuildManagerCompiledView, IView
Inheritance
WebFormView
Implements
Inherited Members

Constructors

WebFormView(ControllerContext, string)

Initializes a new instance of the WebFormView class using the controller context and view path.

public WebFormView(ControllerContext controllerContext, string viewPath)

Parameters

controllerContext ControllerContext

The controller context.

viewPath string

The view path.

WebFormView(ControllerContext, string, string)

Initializes a new instance of the WebFormView class using the controller context, view path, and the path to the master page.

public WebFormView(ControllerContext controllerContext, string viewPath, string masterPath)

Parameters

controllerContext ControllerContext

The controller context.

viewPath string

The view path.

masterPath string

The path to the master page.

WebFormView(ControllerContext, string, string, IViewPageActivator)

Initializes a new instance of the WebFormView class using the controller context, view path, the path to the master page, and a IViewPageActivator instance.

public WebFormView(ControllerContext controllerContext, string viewPath, string masterPath, IViewPageActivator viewPageActivator)

Parameters

controllerContext ControllerContext

The controller context.

viewPath string

The view path.

masterPath string

The path to the master page.

viewPageActivator IViewPageActivator

An instance of the view page activator interface.

Properties

MasterPath

Gets or sets the master path.

public string MasterPath { get; }

Property Value

string

The master path.

Methods

RenderView(ViewContext, TextWriter, object)

Renders the view to the response.

protected override void RenderView(ViewContext viewContext, TextWriter writer, object instance)

Parameters

viewContext ViewContext

An object that encapsulates the information that is required in order to render the view, which includes the controller context, form context, the temporary data, and the view data for the associated view.

writer TextWriter

The text writer object that is used to write HTML output.

instance object

The view page instance.