Is this correct way to create a Ajax Form in ASP.Net MVC 3.0
@Ajax.BeginForm("ActionName", null, new AjaxOptions
{UpdateTargetId = "dialog-model", InsertionMode = InsertionMode.Replace
}, new { id ="AjaxForm" })
<input class="product-search" id="txtSearchProduct" name="SearchString" type="text" />
<input type="submit" id="AjaxForm" class="button", value="Search"/>
<div id="searchResults">
@Html.Raw((string)ViewBag.TotalList)<br />
<br />
@Html.Raw(ViewData["MarkupSearch"].ToString())
</div>
This works perfectly as needed but give an extra line on the view as
**System.Web.Mvc.Html.MvcForm**
can any one help me in this, how I can remove that extra line.
You need to enclose your form in a using structure.