MvcForm Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
MvcForm(HttpResponseBase) |
Obsolete.
Initializes a new instance of the MvcForm class using the specified HTTP response object. |
MvcForm(ViewContext) |
Initializes a new instance of the MvcForm class using the specified view context. |
MvcForm(HttpResponseBase)
Caution
This constructor is obsolete, because its functionality has been moved to MvcForm(ViewContext) now.
Initializes a new instance of the MvcForm class using the specified HTTP response object.
[System.Obsolete("This constructor is obsolete, because its functionality has been moved to MvcForm(ViewContext) now.", true)]
public MvcForm (System.Web.HttpResponseBase httpResponse);
new System.Web.Mvc.Html.MvcForm : System.Web.HttpResponseBase -> System.Web.Mvc.Html.MvcForm
Public Sub New (httpResponse As HttpResponseBase)
Parameters
- httpResponse
- HttpResponseBase
The HTTP response object.
- Attributes
Exceptions
The httpResponse
parameter is null.
Applies to
MvcForm(ViewContext)
Initializes a new instance of the MvcForm class using the specified view context.
public MvcForm (System.Web.Mvc.ViewContext viewContext);
new System.Web.Mvc.Html.MvcForm : System.Web.Mvc.ViewContext -> System.Web.Mvc.Html.MvcForm
Public Sub New (viewContext As ViewContext)
Parameters
- viewContext
- ViewContext
An object that encapsulates the information that is required in order to render a view.
Exceptions
The viewContext
parameter is null.