title: How to get the correct path in asp.net when deploying from localhost to a development server?
body: <p>I have a simple web application that contains a folder called documents on the root of the website.  Inside documents, is a file called test.doc.  The path and file are stored in a database and when the web app is run, it reads in the values and creates the correct link to test.doc, in this case, it is <a href="http://localhost/documents/test.doc" rel="nofollow noreferrer">http://localhost/documents/test.doc</a>.  The problem occurs when I publish to a folder on a development server.  When I do that, my url is broken because it becomes something like this, <a href="http://development/testapp/documents/test.doc" rel="nofollow noreferrer">http://development/testapp/documents/test.doc</a>.  This fails because it is looking for test.doc in <a href="http://development/documents/test.doc" rel="nofollow noreferrer">http://development/documents/test.doc</a>.  I am not sure how to resolve this issue.</p>
  
  <p>I am currently doing this in the markup, but I am unsure how to use ResolveUrl or ResolveClientUrl with it:</p>
  
  <pre><code>&lt;a runat="server" href='&lt;%# Eval("url") %&gt;'&gt;&lt;%#Eval("title") %&gt;&lt;/a&gt;
  </code></pre>