Find root folder of the site.

  • Thread starter Thread starter Mr. X.
  • Start date Start date
M

Mr. X.

If there is a subfolder on the site,
and I want to reffer to the root-folder of the site.

How can I do that ?
(for example there is another subfolder-2 of the site, and I want to reffer
from subfolder-1 to subfolder-2).

Thanks :)
 
re:
!> How can I do that ?

In ASP.NET, from a file in subfolder-1, use the tilde ( ~ ) :

url = "~/subfolder-2/some.aspx"

The tilde stands for the root folder and any url reference will follow the site's directory structure.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 
Back
Top