ViewUserControl ViewUserControl ViewUserControl Class


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


ViewUserControl() ViewUserControl() ViewUserControl()

Initializes a new instance of the ViewUserControl class.


Ajax Ajax Ajax

Gets the AJAX script for the view.

Html Html Html

Gets the HTML for the view.

Model Model Model

Gets the model.

TempData TempData TempData

Gets the temporary-data dictionary.

Url Url Url

Gets the URL for the view.

ViewBag ViewBag ViewBag

Gets the view bag.

ViewContext ViewContext ViewContext

Gets or sets the view context.

ViewData ViewData ViewData

Gets or sets the view-data dictionary.

ViewDataKey ViewDataKey ViewDataKey

Gets or sets the view-data key.

Writer Writer Writer

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


EnsureViewData() EnsureViewData() EnsureViewData()

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

RenderView(ViewContext) RenderView(ViewContext) RenderView(ViewContext)

Renders the view by using the specified view context.

SetTextWriter(TextWriter) SetTextWriter(TextWriter) SetTextWriter(TextWriter)

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

SetViewData(ViewDataDictionary) SetViewData(ViewDataDictionary) SetViewData(ViewDataDictionary)

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

Applies to