 <p>You don't really need the absolute url. Correct relative url is fine.</p> <p>You should use the <code>Url.Action</code> helper method to generate the correct relative path to your action method. This will generated the proper path irrespective of your current page/view.</p> <pre><code>url: "@Url.Action("ActionMethodName","YourControllerName")" </code></pre> <p><code>Url.Action</code> helper method will work if your javascript code is inside a razor view. But if your code is inside an external js file, you should build the relative url to your app root using <code>Url.Content("~")</code> helper method and pass that to your js code via a variable as explained in <a href="http://stackoverflow.com/questions/34360537/how-do-i-make-js-know-about-the-application-root/34361168#34361168">this post</a> . Try to use javascript namespacing when doing so to prevent possible conflict/overwriting from other global variables with same name.</p> <p><strong>EDIT :</strong> <em>Including Marko's comment as an alternate solution. Thank you :)</em></p> <p>If it is an anchor tag, you can simply use the <code>href</code> attribute value of the clicked link.</p> <pre><code>&lt;a href="@Url.Action("Delete","Product")" class="ajaxLink"&gt;Delete&lt;/a&gt; </code></pre> <p>and in your js code</p> <pre><code>$("a.ajaxLink").click(function(e){ e.preventDefault(); var url = $(this).attr("href"); //use url variable value for the ajax call now. }); </code></pre> <p>If it is any other type of html element, you can use html5 data attribute to keep the target url and use the jQuery data method to retrieve it in your js code.</p> <pre><code>&lt;div data-url="@Url.Action("Delete","Product")" class="ajaxLink"&gt;Delete&lt;/div&gt; </code></pre> <p>and in your js code</p> <pre><code>$(".ajaxLink").click(function(e){ e.preventDefault(); // to be safe var url = $(this).data("url"); //use url variable value for the ajax call now. }); </code></pre>