Class MvcForm
Represents an HTML form element in an MVC view.
public class MvcForm : IDisposable
- Inheritance
-
MvcForm
- Implements
- Inherited Members
Constructors
MvcForm(HttpResponseBase)
Initializes a new instance of the MvcForm class using the specified HTTP response object.
[Obsolete("This constructor is obsolete, because its functionality has been moved to MvcForm(ViewContext) now.", true)]
public MvcForm(HttpResponseBase httpResponse)
Parameters
httpResponse
HttpResponseBaseThe HTTP response object.
Exceptions
- ArgumentNullException
The
httpResponse
parameter is null.
MvcForm(ViewContext)
Initializes a new instance of the MvcForm class using the specified view context.
public MvcForm(ViewContext viewContext)
Parameters
viewContext
ViewContextAn object that encapsulates the information that is required in order to render a view.
Exceptions
- ArgumentNullException
The
viewContext
parameter is null.
Methods
Dispose()
Releases all resources that are used by the current instance of the MvcForm class.
public void Dispose()
Dispose(bool)
Releases unmanaged and, optionally, managed resources used by the current instance of the MvcForm class.
protected virtual void Dispose(bool disposing)
Parameters
disposing
booltrue to release both managed and unmanaged resources; false to release only unmanaged resources.
EndForm()
Ends the form and disposes of all form resources.
public void EndForm()