Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
This is my code:
VB
Dim sname As String = AppSettings.Item("ReportURL") & ReceiptFileName
        Dim script As String = " <script type=""text/javascript"">  window.open('" + sname + "');   </script> "
        ScriptManager.RegisterStartupScript(Me, GetType(Page), "alert", script, False)



i need code to open open pdf in new tab without asking pop block(allow once or block)
Posted

1 solution

You can't. There is no code on your side that you can add to get around the popup blocker, well, other than opening the link in the same window it's clicked in.
 
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