title: ASP.Net WebApi: Invalid URL generated in BeginForm
body: <p>I'm beginning to use WebApi and I'm having an issue with a URL being incorrectly generated</p>
  
  <p>I have an ApiController like this:</p>
  
  <pre><code>public class EntriesController : ApiController
  {
      public HttpResponseMessage Post(Entry entry)
      {
      ...
      }
  }
  </code></pre>
  
  <p>And I was trying to create a standard controller (i.e. not webapi) in the same project to test this api (I already tested the api with fiddler and everything is ok there).</p>
  
  <p>I assumed I could use the standard HTML helpers like this:</p>
  
  <pre><code>@using (Html.BeginForm("Post", "Entries"))
  </code></pre>
  
  <p>However this generates the following markup:</p>
  
  <pre><code>&lt;form action="/Entries/Post" method="post"&gt;
  </code></pre>
  
  <p>and I expected it to generate</p>
  
  <pre><code>&lt;form action="/api/Entries" method="post"&gt;
  </code></pre>
  
  <p>What is the correct way to generate the API url from a view?</p>
  
  <p>I am using the default api and controller routes.</p>
  
  <p>Thanks</p>