Manualy Submiting Unobtrusive MVC 3 Ajax Form

by Rok Bermež 21. April 2011 14:21
If you want to submit Ajax.BeginForm created ajax form a simple this.form.submit() wont work. Well to be exact it will, but not as it was intended. In order to make it work like expected, we can do it like this:
 
Html.DropDownList("selPredavanja",ViewBag.Lectures as SelectList,new { onchange = "Sys.Mvc.AsyncForm.handleSubmit( this.form, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'lectureData' });"})

Tags:

ASP.NET | mvc | Web

Add comment

Calendar

<<  January 2018  >>
MonTueWedThuFriSatSun
25262728293031
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Page List

Month List