Solved

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

Posted on 2004-09-29
2
303 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mobile friendly link not working 4 266
Issue when emailing and there is a space 7 392
Webpage Not Working in IE 27 357
Website Design 13 121
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
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…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now