Get requested webpage URL with asp.net

June 18, 2011 - 13:35

Sometimes its useful to know what web page has been requested by your web browser.

This value is easily obtained by using.

<%
Response.write(Request.Url.ToString)
%>


I would mostly use this for getting details of the actual web page being displayed if I'm doing something clever with SEO friendly URL's, or just dynamically changing the contents of a web page depending on what URL was requested.



© 2011 simplevb.net