Solved

I am using a LinkButton and want to navigate to another page that opens with blank target

Posted on 2004-09-29
2
305 Views
Last Modified: 2010-05-18
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
2 Comments
 
LVL 10

Expert Comment

by:rockmansattic
ID: 12178711
not sure what you mean by a link button, but this javascript may work for you

onClick="window.open('http://www.pageresource.com/jscript/jex5.htm','mywindow','width=400,height=200')"

put it in the place of your target=...
Rockman
0
 
LVL 14

Accepted Solution

by:
Esopo earned 500 total points
ID: 12182337
I don't understand your LinkButton concept.

A link that open in another page looks like this:
<a href="#" target="_blank">Click me!</a>

Somehow I sense you are past this ;)



If you want a buton to open a link in a different document you can use something like this:


<input type="button" name="Button" value="Button" onClick="window.open('http://www.google.com', '_blank')">


This is similar to Rockman's code but I don't use the size settings so the window will be as "normal" as possible. You can do a fair amount of things with this new window you create, check out this link:

http://www.javascripter.net/faq/openinga.htm


Be ware that this is the same way pop-ups are opened, so pop-up blockers will block your new window.

Best regards,

Esopo.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

733 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