Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted

1 solution

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>
 
Share this answer
 
Comments
Masroor Ansari 14-May-15 7:23am    
I have to open this method in new tab

PrintBill(ID);
Masroor Ansari 14-May-15 7:41am    
and the above is not works on controller
F-ES Sitecore 14-May-15 7:45am    
You can't open in a new tab from the controller.

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