I have a page http://localhost:65248/ZeroLabs/msg_preview.aspx
.
I want to get http://localhost:65248/ZeroLabs
part.
My code runs in this page Page_Load
event.
I didn't find anything good in Request.Url
.
Currently I use this:
//http + :// + localhost:65248 + /ZeroLabs
string omg_wtf = Request.Url.Scheme + "://" + Request.Url.Authority + System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath;
I feel this isn't a way how I supposed to get what I want. Any less ugly way, please?