Blankman
Blankman

Reputation: 267010

how to reference the base folder in a asp.net website project?

My urls when I run the asp.net website project (in vs.net 2008) looks like:

http://localhost:54269/www/Default.aspx

So referencing things like:

/sytle/css.css

Doesn't seem to work.

Why does my project have a '/www' folder? Did I set things up wrong?

Upvotes: 0

Views: 820

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038800

This might be the virtual directory. Depending on where you are hosting your application (IIS or running in Visual Studio's built in web server) this is setup differently. In order to avoid problems referencing static files you could use:

<%= Page.ResolveClientURL("~/sytle/css.css") %>

Upvotes: 3

Related Questions