In my ASP.net web project, I\'ve written the following Javascript code in a .js file:
function getDeviceTypes() { var deviceTypes; $.ajax({ a
Create an app root variable...
var root = location.protocol + "//" + location.host;
And use an absolute URI (instead of relative) when you are making AJAX requests...
url: root + "/Controls/ModelSelectorWebMethods.aspx/getDeviceTypes"