GetAbsoluteSecuredPageUrl – retrieving the absolute Url of a secured page

' Return the absolute Url of a secured page (that uses the https protocol)' The input string is the page's relative path' Example: Dim url As String = GetSecuredPageUrl("./Admin/Login.aspx")Function GetAbsoluteSecuredPageUrl(ByVal relativeUrl As String) As String    Dim url As New Uri(HttpContext.Current.Request.Url, relativeUrl)    Return url.ToString().Replace("http://", "https://")End Function

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: