Thursday, May 20, 2004

Getting the absolute path in ASP.NET

This could be useful if I get to do any ASP.NET development again.

Getting the absolute path in ASP.NET: "Typically when we create ASP.NET applications, we are developing against a virtual directory. However, when we deploy our app to a production web server, it is likely set up as a web site. This can have an impact on href assignments when using absolute paths. In order for paths to be consistant between virtual directories and web sites, I created a helper method that will work in either environment. "