Hi,
Use this example:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Request.ServerVariables("HTTP_REFERER") <> www.xyz.com/Page1.aspx Then
'redirect to error page
Else
'allow page to process
End If
End Sub
It is from: http://forums.asp.net/t/1240920.aspx
Zhao Ji Ma
Sincerely,
Microsoft Online Community Support
“Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”