Using ASP.net VB
I want to build and display Page2.asp when I click a button on Page1.asp.
I have my main ASP.net page, and when I click a button I run the following code:
Code:
Dim filename as string = "Page2.asp"
Dim redirect As String = "<script>window.open('" & filename & "');</script>"
Response.Write(redirect)
When I Load Page2 I want to run some initialization code. I placed this in a subroutine called Initialize, and put a breakpoint on the subroutine call. The code behind file is:
Code:
Public Class Page2
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Initialize()
End Sub
Sub Initialize()
' a bunch of code
end Sub
end Class
The initialization code is populating a chart with data from Page1. The code never breaks on Initialize statement in the the Page_Load. What am I doing wrong? How do I trigger the Initialize code?