Solved

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

Posted on 2013-10-30
4
3,466 Views
Last Modified: 2013-11-04
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
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 39612900
try:

Dim script As String = "window.open('Page1.aspx');"
ClientScript.RegisterStartupScript(cstype, "open", script, True)
0
 

Author Comment

by:Murray Brown
ID: 39613511
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
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 39613903
change it to :

ClientScript.RegisterStartupScript(Me.GetType(), "open", script, True)
0
 

Author Closing Comment

by:Murray Brown
ID: 39621613
thanks very much
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question