jquery - on page load event $.ajax function sends ajax request. while we looks the url in the Global.asax file it is different Url -


$(function () {   $.ajax({             url: "mysettings/changepassword",                             type: "post",             success: function (response) {                 $('#view-settings').html(response);                 hideflywithmessage("loaded");             }         }); } 

when above code executed send request "mysettings/index/mysettings/changepassword" url.

it shows in console window.

if place slash(/) @ beginning, ajax url treat hostname/yoururl

so, change url below

$.ajax({             url: "/mysettings/changepassword", ..... }); 

Comments

Popular posts from this blog

iOS: Performance of reloading UIImage(name:...) -

How to prevent logback from emitting repeated "Empty watch file list. Disabling" messages -

c# SetCompatibleTextRenderingDefault must be called before the first -