Class HtmlHelper<TModel>
Represents support for rendering HTML controls in a strongly typed view.
public class HtmlHelper<TModel> : HtmlHelper
Type Parameters
TModel
The type of the model.
- Inheritance
-
HtmlHelper<TModel>
- Inherited Members
- Extension Methods
Constructors
HtmlHelper(ViewContext, IViewDataContainer)
Initializes a new instance of the HtmlHelper<TModel> class by using the specified view context and view data container.
public HtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
Parameters
viewContext
ViewContextThe view context.
viewDataContainer
IViewDataContainerThe view data container.
HtmlHelper(ViewContext, IViewDataContainer, RouteCollection)
Initializes a new instance of the HtmlHelper<TModel> class by using the specified view context, view data container, and route collection.
public HtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
Parameters
viewContext
ViewContextThe view context.
viewDataContainer
IViewDataContainerThe view data container.
routeCollection
RouteCollectionThe route collection.
Properties
ViewBag
Gets the view bag.
public dynamic ViewBag { get; }
Property Value
- dynamic
The view bag.
ViewData
Gets the strongly typed view data dictionary.
public ViewDataDictionary<TModel> ViewData { get; }
Property Value
- ViewDataDictionary<TModel>
The strongly typed view data dictionary.