?
Solved

I am using a LinkButton and want to navigate to another page that opens with blank target (target="_blank")

Posted on 2004-09-29
4
Medium Priority
?
1,180 Views
Last Modified: 2008-03-17
I am using a LinkButton and want to navigate to another page that opens with blank target (target="_blank")

I have used response.redirect(URL) to navigate to the page but the LinkButton wont accept target="_blank" property.

I am using a linkbutton because I need other code to respond to the click event.

If there is an easier way to navigate to a page, respond to the click event and have the page you navigate to open up in a target="_blank" setup then I'll be delighted to hear about it.

Thanks in advance

Paul G
0
Comment
Question by:pgilfeather
[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
4 Comments
 
LVL 6

Expert Comment

by:Volkan Vardar
ID: 12178177
Response.Write("<script>window.open('pageURL.aspx')</script>")
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 12178861
Button1.Attributes.Add("Onclick", "Javascript:window.open('http://someserver/somecgi.exe?params=whatever','new','resizable=yes')")

Regards,

Aeros
0
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 1500 total points
ID: 12179047
For customized window using Javascript, try this link: http://javascript.about.com/library/weekly/aa031203a.htm
In ASP.Net you can use Javascript this way:
Inside the Button_Clicked event,

    Dim MyJavaScript As String
    MyJavaScript = "<script>window.open('pageURL.aspx')</script>"
    Page.RegisterStartupScript(MyScript, MyJavaScript)

More on RegisterSctript: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIPageClassRegisterStartupScriptTopic.asp

-Baan
0
 
LVL 33

Expert Comment

by:raterus
ID: 12180779
Essentially what everyone is trying to say is LinkButtons ALWAYS postback to the server, that is what they are meant to do.  If you don't need to postback before you redirect, then I would just use a regular hyperlink.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

801 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