Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Response.TransmitFile is not opening the links directly from SharePoint Library c#

$
0
0

Hi,

 I want to open a pdf file from a sharepoint library. I am using Response.TransmitFile to do that. But it throws me the error "'url' is not a valid virtual path". Is there anyway otherway to do this.

            Response.Clear();
            Response.ClearHeaders();            
            Response.ContentType = "application/pdf";
            Response.TransmitFile("URL to the library" + fileName);
            Response.Flush();
            Response.End();


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>