如何在response.redirect中提供目标_blank? [英] How to give target _blank in response.redirect?

查看:59
本文介绍了如何在response.redirect中提供目标_blank?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨..



如何在response.redirect中给目标_blank?



我的代码是..

 Response.Redirect( < ; script> window.open('PDF / + result +   _ + liYear.Text +   _ + liQuater.Text +   。pdf','_ blank');< / script>); 



但我收到错误..



如何做到这一点???

解决方案

你好,你可以不要在response.redirect中使用_blank,而是可以尝试使用以下代码。



 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); 


检查这两个,首先尝试不。你的案例有1个链接:

如何在response.redirect上使用Target = _blank? [ ^ ]

如何使用代码中的Response.Redirect设置目标,如'_blank',而不使用javascript [ ^ ]

hi..

how to give target _blank in response.redirect??

my code is..

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


but i get error..

how to do this???

解决方案

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);


Check these two, at first try no. 1 link on your case:
How do I use Target=_blank on a response.redirect?[^]
How to set target like '_blank' using Response.Redirect in code behind without using javascript[^]


这篇关于如何在response.redirect中提供目标_blank?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆