如何在新选项卡中打开方法 [英] How Do I Open Method In New Tab
本文介绍了如何在新选项卡中打开方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
长时间? ID = POS_Sales_Bill_MasterObj.POS_Sales_Bill_Master.Sales_Bill_ID;
PrintBill(ID);
返回RedirectToAction(" Index");
i想打开printbill方法,打印报告在新标签中有正确的网址
解决方案
请求您的操作需要指定它的link \形式是在新窗口中打开\ tab,您无法从服务器代码执行此操作,因此请添加相关的目标到相关链接\\。形式。
< a href =/ Controller / Actiontarget =_ blank>查看报告< / a>
long? ID = POS_Sales_Bill_MasterObj.POS_Sales_Bill_Master.Sales_Bill_ID;
PrintBill(ID);
return RedirectToAction("Index");
i want to open printbill method which is printing report having proper url in new tab
解决方案
The link\form that requests your action needs to specify it is to open in a new window\tab, you can't do it from your server code, so add the relevant "target" to the relevant link\form.
<a href="/Controller/Action" target="_blank">View report</a>
这篇关于如何在新选项卡中打开方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文