Paths for files

Discussion in 'Visual Studio' started by muvieflicks, Jul 13, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am trying to put some music and video on my site.

    Firstly, i am able to do them successfully on my local machine by placing the media URLs to a folder in the ASP.NET Website project, for ex: AudioURL='~/music/testsong.mp3' This works, as expected.
    But as I upload the website to my site here, it tries to find that URL and gives an error, as if it is looking for a complete URL, what i am doing wrong?

    thank you a lot for your time and response.
     
  2. Hi,
    Depends on where you are using the URLs.
    ASP.NET controls can use the master root directive "~".
    If they are not ASP.NET controls you should use a slash "/"
    You don't need the HTTP for things like this but it can be used.

    You may even at times with non ASP.NET controls want the link to have a "climbed" path.
    i.e. "../music/testsong.mp3"
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page