MVC3 Retrieving the browser Url

Code Snippet
  1. Public Module MyUrlExtensions
  2.     <Extension()> _
  3.     Public Function UrlOriginal(ByVal request As HttpRequestBase) As Uri
  4.         Dim hostHeader As String = request.Headers(“host”)
  5.         Return New Uri(String.Format(“{0}://{1}{2}, request.Url.Scheme, hostHeader, request.RawUrl))
  6.     End Function
  7. End Module



No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *