Solved

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

Posted on 2013-10-30
4
3,428 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:murbro
[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:murbro
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:murbro
ID: 39621613
thanks very much
0

Featured Post

Industry Leaders: 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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

749 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