Click here to Skip to main content
15,895,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi..

how to give target _blank in response.redirect??

my code is..
C#
Response.Redirect("<script>window.open('PDF/" + result + "_" + liYear.Text + "_" + liQuater.Text + ".pdf','_blank');</script>");

but i get error..

how to do this???
Posted
Updated 19-Dec-13 19:45pm
v3

Hi you can not use _blank in response.redirect but instead of that you can try following code.

ScriptManager.RegisterStartupScript(this, typeof(string), "New_Window", "window.open( 'http://www.website.com', null, 'height=800,width=1280,status=yes,toolbar=yes,menubar=yes,location=no' );", true);
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900