title: What is the preferred way to get the full server path in a ASP.NET MVC view?
body: <p>I'm new to ASP.NET MVC and I'm trying to get the full url to a action when working in a view. I need this to submit to a third party API as a callback. For example what I need is</p>
  
  <blockquote>
    <p><a href="http://myserver.com/controller/action" rel="noreferrer">http://myserver.com/controller/action</a></p>
  </blockquote>
  
  <p>When I use </p>
  
  <pre><code>&lt;%= Url.Action("action", "controller") %&gt;
  </code></pre>
  
  <p>I get </p>
  
  <blockquote>
    <p>/controller/action</p>
  </blockquote>
  
  <p>I know several ways to add the server base-path to this but I'm wondering what is the preferred way to do this in the ASP.NET MVC view?</p>
  
  <p>EDIT: Just to clarify, it's not the URL for the current view/action it's for another action in the same controller.</p>