ASP.NET MVC shows ajax result in a new page instead of UpdateTargetId -
I am using Ajax.BeginForm to create an Ajax request, but instead of a new asp.net mvc division Displays the results in the page I set in UpdateTargetId I have ensured that I have only one device on the page with the same name.
The generated markup is:
& lt; Form action = "/ myController / MyAction" id = "myoform" method = "post" onsubmit = "Sys.Mvc.AsyncForm.handleSubmit (this, new Sys.UI.DomEvent (event), {insertionMode: Sys.Mvc.InsertionMode .replace, updateTargetId: 'myDiv', onSuccess: function.Sant DeliGet (this, some jazz functions)}); Here, the submit button is not displayed because I am clicking with it javascript (I am using the same method on another page that works):
$ (document) .ready (function () {$ ("[name: 'name '] "). Bind (" keyup ", function () {$ (" # mySubmit "). Click ();})
I have the latest version of asp.net mvc I am not getting any script errors, I have checked all the IDs, all JS functions are present and work without errors. The markup is html strictly valid, except that these inputs can not be in direct form, but it works fine on other pages. The code of the server continues successfully and the returned markup is absolutely correct. Everything looks fine, in addition to the results displayed on a new page inside my diva. Am i doing wrong
I had a lot of problem, and the solution was referred to MicrosoftAjax.js and MicrosoftMvcAjax .JS, which I forgot I went.
Comments
Post a Comment