<p>
 Ajax Custom
</p>

<p>

 <div id=”customresponse”></div>

 <% using (Ajax.BeginForm(“AjaxCustom”, new AjaxOptions { UpdateTargetId = “customresponse” }))
 { %>
 
   
  <div>
   Name: <%= Html.TextBox(“CustomName”)%>
  </div>
  <div>
   Value: <%= Html.TextBox(“CustomValue”)%>
  </div>
  
  
  <input type=”submit” value=”save” />
  

 <% } %>
</p>

 

[HttpGet, ChildActionOnly]
public ActionResult AjaxCustom()
{
 return PartialView();
}

[HttpPost]
public ActionResult AjaxCustom(FormCollection post)
{
 return Content(“Success”);
 //return PartialView();
}

public ActionResult AjaxIndex()
{
 return View();
}