c# - Open physical file on the server using ASP.NET -


i want open physical file on server on hyperlink click.

<asp:hyperlink id="hybutton1" target="_blank" navigateurl='<%#eval("fullpath") %>' runat="server" text="open file" ></asp:hyperlink> 

"fullpath" "e:\pincdocs\mydoc.pdf"

currently in chrome i'm getting error.

not allowed load local resource:

can done or other alternative solution?

the physical file should located within iis web site, virtual directory or web application. you'd need create virtual directory e:\pincdocs. see here instructions: http://support.microsoft.com/kb/172138

then in code behind can use code like: http://geekswithblogs.net/alslog/archive/2006/08/03/87032.aspx url physical file.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -