简体   繁体   中英

Open file with link button

编辑有人知道如何通过标记或以编程方式使用链接按钮在Intranet上的共享位置上载/打开文件吗?

 <asp:LinkButton runat="server" ID="btnGetFile" CommandName="GetFile" CommandArgument='<%# Eval("Id") %>' Visible="false" Text='<%# Eval("FormName") %>'></asp:LinkButton>

You are talking about files on your local computer, is that correct? If so according to this site , it cannot be done in ASP.NET.

If you are working from a web application there are a lot of security restrictions when it comes to accessing local files. If you are writing the application for use locally you might be able to give permissions to open local files by giving the DefaultAppPool User access to the files in question.

Îf you are planning on puttting your app on the web on the other hand, you options are pretty limited.

Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM