I want to open a physical file on the server on HyperLink click.
<asp:HyperLink ID="HyButton1" Target="_blank" NavigateUrl='<%#Eval("FullPath") %>' runat="server" Text="Open File" ></asp:HyperLink>
"FullPath" is like "E:\PINCDOCS\Mydoc.pdf"
Currently in Chrome i'm getting the error.
Not allowed to load local resource:
Can this be done or any other alternative solution?
The physical file should be located within an IIS Web Site, Virtual Directory or Web Application. So you'd need to create a virtual directory to E:\PINCDOCS. See here for instructions: http://support.microsoft.com/kb/172138
Then in your code behind you can use code like: http://geekswithblogs.net/AlsLog/archive/2006/08/03/87032.aspx to get a Url for the physical file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With