You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用ASP.NET和C#从SQL Server显示PDF时点击下载链接出错求助

问题

我正尝试使用ASP.NET和C#从SQL Server中显示PDF文件,点击下载链接时出现错误,恳请帮助。

相关代码

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="SqlDataSource1">
    <Columns>
        <asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True" SortExpression="Id" />
        <asp:BoundField DataField="newsfile" HeaderText="newsfile" SortExpression="newsfile" />
        <asp:BoundField DataField="details" HeaderText="details" SortExpression="details" />
        <asp:BoundField DataField="DocumentFile" HeaderText="DocumentFile" SortExpression="DocumentFile" />
        <asp:BoundField DataField="Admin_FK" HeaderText="Admin_FK" SortExpression="Admin_FK" />
        <asp:HyperLinkField DataNavigateUrlFields="newsfile" DataTextField="newsfile" HeaderText="newsfile" Text="newsfile" />
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WSSBConnectionString4 %>" SelectCommand="SELECT * FROM [tender2]"></asp:SqlDataSource>

错误截图

错误截图


内容的提问来源于stack exchange,提问作者Creative Mind

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 09:42:31