HtmlHelper Constructors

Definition

Overloads

HtmlHelper(ViewContext, IViewDataContainer)

Initializes a new instance of the HtmlHelper class by using the specified view context and view data container.

HtmlHelper(ViewContext, IViewDataContainer, RouteCollection)

Initializes a new instance of the HtmlHelper class by using the specified view context, view data container, and route collection.

HtmlHelper(ViewContext, IViewDataContainer)

Initializes a new instance of the HtmlHelper class by using the specified view context and view data container.

public HtmlHelper (System.Web.Mvc.ViewContext viewContext, System.Web.Mvc.IViewDataContainer viewDataContainer);
new System.Web.Mvc.HtmlHelper : System.Web.Mvc.ViewContext * System.Web.Mvc.IViewDataContainer -> System.Web.Mvc.HtmlHelper
Public Sub New (viewContext As ViewContext, viewDataContainer As IViewDataContainer)

Parameters

viewContext
ViewContext

The view context.

viewDataContainer
IViewDataContainer

The view data container.

Exceptions

The ViewContext or the viewDataContainer parameter is null.

Applies to

HtmlHelper(ViewContext, IViewDataContainer, RouteCollection)

Initializes a new instance of the HtmlHelper class by using the specified view context, view data container, and route collection.

public HtmlHelper (System.Web.Mvc.ViewContext viewContext, System.Web.Mvc.IViewDataContainer viewDataContainer, System.Web.Routing.RouteCollection routeCollection);
new System.Web.Mvc.HtmlHelper : System.Web.Mvc.ViewContext * System.Web.Mvc.IViewDataContainer * System.Web.Routing.RouteCollection -> System.Web.Mvc.HtmlHelper
Public Sub New (viewContext As ViewContext, viewDataContainer As IViewDataContainer, routeCollection As RouteCollection)

Parameters

viewContext
ViewContext

The view context.

viewDataContainer
IViewDataContainer

The view data container.

routeCollection
RouteCollection

The route collection.

Exceptions

One or more parameters is null.

Applies to