Protected Sub Page_Init(sender As Object, e As System.EventArgs) Handles Me.Init
'Redirect to another page and preserve any passed parameters.
Dim ThisPageUrl As String = Request.RawUrl
Dim ThisPageFile As String = IO.Path.GetFileName(Request.Path)
Dim RedirectPageFile As String = "RedirectPage.aspx"
Dim RedirectPageUrl As String = ThisPageUrl.Replace(ThisPageFile, RedirectPageFile)
Response.Redirect(RedirectPageUrl)
End Sub
Tips and tricks for .NET using ASP and VB code.
Redirect to another page and preserve any passed parameters.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment