Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

target name does not work in

I am using the hyperlink control in 2003. 

I want the link to open an ew window and display a pdf file.

No matter what I set the target propery to (including "_new" and arbitrary names such as "display_image") the image always displays in the current window.   

After resetting the target property, I have confirmed in the 'Watch Window' that the value is set as I had intended.

Daniel S. Kelley
Thursday, November 13, 2003

Can you post the markup (or the code from the code-behind file)?

Rick Childress
Thursday, November 13, 2003

Try setting the target to _blank

Thursday, November 13, 2003

Does the "target=..." piece show up in the resulting HTML?
I mean, when you view the source in the browser, do you see it? My guess would be that you don't. Try adding the property dynamically:

YourLinkControl.Attributes.Add("target", "_blank");

I' be surprised if this disn't make it to the browser.

- Mike.

Monday, December 1, 2003

I finally got back to this project and your suggestion to add a new attribute worked perfectly.  Thanks for the suggestion.

Daniel S. Kelley
Monday, March 8, 2004

*  Recent Topics

*  Fog Creek Home