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
httpResponseHttpResponseBaseThe HTTP response object.
Exceptions
- ArgumentNullException
The
httpResponseparameter is null.
MvcForm(ViewContext)
Initializes a new instance of the MvcForm class using the specified view context.
public MvcForm(ViewContext viewContext)
Parameters
viewContextViewContextAn object that encapsulates the information that is required in order to render a view.
Exceptions
- ArgumentNullException
The
viewContextparameter 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
disposingbooltrue 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()