What is the simplest way to generate domain specific url from application path..?
- by harsh
I have application specific url like below
~/Default.aspx
~/Manage/Page.aspx
~/Manage/Account/Default.aspx
I really don't know what are these kind of paths actually called.
Now I need them to convert to domain specific complete URL. No ../ or ../../ like thing in the URL. I want URLs like
http://www.example.com/Default.aspx
http://www.example.com/Manage/Page.aspx
http://www.example.com/Manage/Account/Default.aspx
Currently I am doing this following way (assuming I have HttpRequest object)
Request.Url.Host + path.Substring(1);
Is there a more simplest way to achieve this..?