Controller:
public class HomeController : Controller
{
//
// GET: /Home/
[HttpGet]
public ActionResult ModelUse()
{
return View();
}
[HttpPost]
[ActionName("ModelUse")]
public ActionResult AjaxAdd()
{
return Content("Avnish");
}
public ActionResult AjaxAdd1()
{
return Content("Avnish1234");
}
}
VIEW:
@using (Ajax.BeginForm("AjaxAdd1","Home", new AjaxOptions { UpdateTargetId = "AjaxAdd", HttpMethod = "post" }))
{
<button>Click</button> <div id="AjaxAdd"></div>
}
I am not able to hit AjaxAdd1 ActionResult.
Views:
9726
Total Answered:
3
Total Marked As Answer:
0
Posted On:
04-Sep-2015 10:22