Ok so I want to know how
<% using (Html.BeginForm()) { %>
<input type="text" name="id"/>
<% } %>
produce
<form>
<input type="text" name="id"/>
</form>
namely how does it add the </form>
at the end? I looked in codeplex and didn't find it in the htmlhelper. There is a EndForm method, but how does the above know to call it?
The reason is I want to create an htmlhelper extension, but don't know how to close out on the end of a using.
Any help would be appreciated :)