开发者

ajax success event not firing

开发者 https://www.devze.com 2023-02-14 14:16 出处:网络
In my MVC aplciation i am using ajax post to reload some part of the view. I am using following jquery to 开发者_StackOverflow社区post

In my MVC aplciation i am using ajax post to reload some part of the view. I am using following jquery to 开发者_StackOverflow社区post

          $.post(
                 '<%= Url.Action("SearchResult", "Search") %>',
                 { content: 'GetCallDetails' },
                 function (result) 
                     { success(result); }
             );

             function success(result) {
                alert("Test message.");
                 $("#player").html(result);
              }

From contoller I am returning like this

  return PartialView("SearchResutPlayer", searchModel);

Its not partially reloading the ascx and i cant even see that test mesasage? Any idea?


$.post('/SearchResult/Search',{ content: 'GetCallDetails' },
          function (result) 
             {
               success(result);
              }
       );

Try This.

Check whether your action in controller is called by puting a debug point

0

精彩评论

暂无评论...
验证码 换一张
取 消