MSDN Library

MvcForm.Dispose Method

Releases all resources that are used by the current instance of the MvcForm class.

Namespace:  System.Web.Mvc.Html
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public void Dispose()



This method renders the closing </form> tag at the end of a Using statement.

Call Dispose when you are finished using the MvcForm instance. The Dispose method leaves the MvcForm instance in an unusable state. After you call Dispose, you must release all references to the MvcForm instance so that the garbage collector can reclaim the memory that the MvcForm instance was occupying.

For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

© 2015 Microsoft