I am writing a c# application.
I am accessing a page eg http://dev.mysite.com/page.aspx
How can I retrieve from the current context this http://dev.mysite.com/
I want to use this when creating url’s in different environments so need to read it from the current request context.
or if you are inside this
page.aspxyou could directly use theRequest.Urlproperty: