Simple question

  • Thread starter Thread starter Steve S
  • Start date Start date
S

Steve S

In the code, how do you reference the web directory that the files sit in?

Thanks
 
What do you mean 'reference'? Do you want the actual file system directory
(C:\inetpub\wwwroot\...)? Then use Server.MapPath(".")

and if not, you want to reference it via a relative URL, you use "." (no
quotes) to mean the current directory. Note I used this above to the
function call MapPath
 
I need to know how to do it in the .cs file, not the aspx. (sorry, my fault
:)

Thanks,
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top