Click here to Skip to main content
16,019,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have Link Button when i click it will generate pdf(RDLC) file inside folder,i want to open that Pdf file when link button fire in server side
Posted
Updated 12-Oct-19 0:13am
Comments
Maciej Los 10-Dec-14 2:02am    
What have you done? Where are you stuck?
SathishRam 10-Dec-14 5:22am    
i wanna write vb code server side to open pdf file

XML
<html>
    <head>
        <script type="text/javascript">
            function openTab(th)
            {
                window.open(th.name,'_blank');
            }
        </script>
    </head>
    <body>
        <a onClick="openTab(this)" href="#" name="PDF/Govt_Holiday-2014.pdf">Download Pdf</a>
    </body>
</html>
 
Share this answer
 
Comments
SathishRam 12-Dec-14 3:58am    
Thanks man but i will create my pdf file dynamically,here i got my solution
<
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)
>
You Have Set Target As '_Blank' and

code behind Get Path USing the Server.mapPath
and Then Respose.Redirect ("Your Path")
 
Share this answer
 
Comments
SathishRam 10-Dec-14 4:53am    
without using Response.Redirect,
is there any?

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