Reputation: 15378
I create new blank solution. Add exist web site. Structure: Solution E:...\projectname Folders: bin app_code app_data ...
http://localhost:49062/projectname/
but I need only http://localhost:49062.
How to do this?
Upvotes: 4
Views: 1512
Reputation: 1
Simply, Use .Split(char) method. you can do something like that:
string web = "http://localhost:49062/projectname/";
string[] webParts = web.Split('/');
and all the webParts[] cell will be like that:
webParts[0] = http://
webParts[1] = localhost:49062
webParts[2] = projectname
`
I might be mistaken in the cell parts, but it's sure works. test it.
Upvotes: -1
Reputation: 103388
In Visual Studio 2010:
Virtual Path
it will state "/projectname"Try "View In Browser" again. This should now have removed the root folder name from the URL
Upvotes: 8