ViewUserControl Class

Definition

Represents the information that is needed to build a user control.

public class ViewUserControl : System.Web.UI.UserControl, System.Web.Mvc.IViewDataContainer
type ViewUserControl = class
    inherit UserControl
    interface IViewDataContainer
Public Class ViewUserControl
Inherits UserControl
Implements IViewDataContainer
Inheritance
ViewUserControl
Derived
Implements

Constructors

ViewUserControl()

Initializes a new instance of the ViewUserControl class.

Properties

Ajax

Gets the AJAX script for the view.

Html

Gets the HTML for the view.

Model

Gets the model.

TempData

Gets the temporary-data dictionary.

Url

Gets the URL for the view.

ViewBag

Gets the view bag.

ViewContext

Gets or sets the view context.

ViewData

Gets or sets the view-data dictionary.

ViewDataKey

Gets or sets the view-data key.

Writer

Gets the writer that is used to render the view to the response.

Methods

EnsureViewData()

Ensures that view data is added to the ViewDataDictionary object of the user control if the view data exists.

RenderView(ViewContext)

Renders the view by using the specified view context.

SetTextWriter(TextWriter)
Obsolete.

Sets the text writer that is used to render the view to the response.

SetViewData(ViewDataDictionary)

Sets the view-data dictionary by using the specified view data.

Applies to