• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3631
  • Last Modified:

ASP.net VB.net Open web page behind button click in new tab or browser

Hi
I use the following VB.net code to behind a button click to open a web page
Response.Redirect("Page1.aspx")

I need to open the page in a new browser or tab.
How do I do that?
0
Murray Brown
Asked:
Murray Brown
  • 2
  • 2
1 Solution
 
Paul JacksonCommented:
try:

Dim script As String = "window.open('Page1.aspx');"
ClientScript.RegisterStartupScript(cstype, "open", script, True)
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Hi. Thanks. I get the following error

Error      23      'cstype' is not declared. It may be inaccessible due to its protection level.      C:\Users\murbro\Documents\Visual Studio 2010\Projects\GREAT\GREAT\GREAT_Page.aspx.vb      109      48      GREAT
0
 
Paul JacksonCommented:
change it to :

ClientScript.RegisterStartupScript(Me.GetType(), "open", script, True)
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
thanks very much
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now