Private Sub Page_Load(sender As Object, e As EventArgs)
If Not IsPostBack Then
Dim MyUrl As Uri = Request.UrlReferrer
Response.Write("Referrer URL Port: " & MyUrl.Port)
End IF
End Sub
..and received the same error that you did. However, when I opened this page from a "previous" page (i.e., I put Test.aspx on a button on another aspx page directing it to this page) it worked fine. Hope this helps.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.