I have a c# code and need to get full URL address from current page. In method I have :
string url = HttpContext.Current.Request.Url.AbsoluteUri;
but there is error. HttpContext does not exist in the current context
i have dll (using System.Web;) second try was:
string url = Request.Url.Host;
but error on Request does not exist.
how can get URL address ? my main question is. why i got error on HttpContext or Request.Url.Host ?