title: ASP.NET setting a path for file with VB
body: <p>So this is a pretty dumb question, and one I am clearly misunderstanding for whatever the reason.  I have an ASP.net project and the default aspx page loads a file.  I made a class to deal with file handling, in it I hard coded the local directory to where that file is.  I want to make that path relative to the default.aspx page.  I can't figure out how to do that.  I have read a lot of stuff on MSDN, and it makes simple sense, but when I put it to code I can't seem to get it right.</p>
  
  <p>I feel my answer is here, I understand what it is saying but I can't translate that to my program.<a href="http://msdn.microsoft.com/en-us/library/ms178116.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms178116.aspx</a>. Code such as </p>
  
  <pre><code>Dim rootPath As String = Server.MapPath("~")
  </code></pre>
  
  <p>makes sense to me but I can't use 'Server' for some reason.</p>
  
  <p>I have used this spot of code to supplement my problem for now.</p>
  
  <pre><code>string=System.AppDomain.CurrentDomain.BaseDirectory()
  </code></pre>
  
  <p>Any help leading me on the right....path, would be appreciated.</p>