C#代码打开pdf,没有下载选项 [英] C# code to open pdf with out the option to download

查看:79
本文介绍了C#代码打开pdf,没有下载选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在Web应用程序中打开pdf而不允许用户保存/下载相同的文件?

解决方案

请参阅此链接以了解答案。



希望这可以帮助你回答你的问题。



禁用PDF保存并打印按钮 [ ^ ]


您可以管理您的像这样的查询 -



选择txt_noticedesc,case isnull(txt_tcfile,'')当''然后''else'< a style =颜色:#800000 href = docs /'+ replace(txt_tcfile,'','%20')+'target = _blank>查看< / a>'结束为来自M_tendernotices订单的txt_link txt_noticeno desc 





此处docs是文件夹名称,其中保存所有pdf文件

并将数据绑定到网格视图赞



 < ;   asp:TemplateField     HeaderText   = 链接 >  
< ItemTemplate >
< asp:标签 ID = Label1 ru nat = server 文本 =' <% #Eval( txt_link%> ' > < / asp:标签 >


< / ItemTemplate >


Is there any way to open a pdf in the web application without allowing the user to save/downlaod the same ?

解决方案

Refer this link to know the answer.

Hope this would help you to answer your question.

Disable PDF Save and Print Button[^]


You Can Manage Your Query Like this-

select  txt_noticedesc , case isnull(txt_tcfile,'') when '' then '' else '<a style=color: #800000 href=docs/'+ replace(txt_tcfile,' ','%20') +' target=_blank> View </a>' end as txt_link from  M_tendernotices order by txt_noticeno desc



Here docs is folder name where all pdf filed are saved
and Bind Data to Grid View Like

<asp:TemplateField HeaderText="Link">
    <ItemTemplate>
       <asp:Label ID="Label1" runat="server" Text='<%#Eval("txt_link") %>' ></asp:Label>
        

    </ItemTemplate>


这篇关于C#代码打开pdf,没有下载选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆