pgilfeather
asked on
I am using a LinkButton and want to navigate to another page that opens with blank target (target="_blank")
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
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
Response.Write("<script>wi ndow.open( 'pageURL.a spx')</scr ipt>")
Button1.Attributes.Add("On click", "Javascript:window.open('http://someserver/somecgi.exe?params=whatever','new','resizable=yes') ")
Regards,
Aeros
Regards,
Aeros
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.