I am Using ASP.NET web forms. In my application i need to be able to get to routedata of UserName in URL.
Url looks like this: localhost/profile/MyRAndomUserNAme
There are no problems to receive it in On_Load event like this:
string userName = Page.RouteData.Values["UserName"] as string;
But if i am in my Asmx WebService and try to receive UserName from URL, it just doesn't work. So how do i get around it?
PS: Its not a MVC project so i cant use var userName = ViewContext.RouteData.Values["UserName"];
on a view