virtualpath

How do you convert a url to a virtual path in asp.net without manual string parsing?

I've seen similar questions and answers regarding conversions from virtual to absolute and url, but how can I convert a url to a virtual path without manual string parsing? Example: I want "http://myserver/home.aspx" converted to: "~/home.aspx" I realize the above example would be an easy string parsing routine, but I'm looking for a...

VirtualPath setting on Visual Studio 2005

I changed the virtualpath setting on the website properties from '/sitename' to '/'. Index.aspx page on the root folder correctly points to http://localhost:4144/sitename/Index.aspx. But, hyperlink for the image button on every page in the subfolder points to http://localhost:4144/Subfolder/Page1.aspx instead of http://localhost:4144/si...

"Virtual Path Not Known" When running ASP.NET MVC Unit Test Project!

Does anyone know why is it not possible to get the virtualpath when you are running the asp.net mvc unit test project? Is it because it creates a Temp folders under TestResults Folder.?? ...

ASP.NET MVC: Can't figure out what VirtualPath is?

I have a View that displays a list of images and i am now trying to get it to display the images as thumbnails. Well, i'm pretty sure i got most of it right using VirtualPath's from a custom ActionResult although i can't seem to figure out what it is making the VirtualPath url?? BTW, i'm using XML to store the data from the images inst...

How to resolve issue with image path when testing HtmlHelper?

I came across an issue when I was testing my HTML Helper. Basically I'm creating a grid with loads of rows, columns and different types of data in it. In the header there is also a image to notify the user what column the data is sorted by. However, when I'm writing my test now (way too late, but better late than never right?!), I get th...