public static void EndForm(this HtmlHelper This)
{
var fd = This.GetFormData();
if (fd.currentForm != null)
{
if (fd.FormFields != null)
{
string fields = string.Join(",", fd.FormFields.ToArray());
var tag = new TagBuilder("input");
tag.AddAttribute("type", "hidden");
tag.AddAttribute("name", "_Manos_Mvc_FormFields");
tag.AddAttribute("value", md5.Calculate(This.Context.Application.ServerKey + fields) + "/" + fields);
This.Output.Write(tag.Render());
This.Output.Write("\n");
fd.FormFields = null;
}
This.Output.Write("</form>");
var old = fd.currentForm;
fd.currentForm = old.outer;
old.Close();
}
}