我正在使用asp.net CreateUserWizard创建门户网站。界面页面如下所示:




在最后一步中,我有一个指向pdf文件的链接。我想要的是通过点击它,一个pdf文件将被打开。无论它如何失败,它总是转到第一个屏幕(登录网页)。最后一步对应的代码:
<asp:CompleteWizardStep runat="server" ID="CompleteWizardStep">
<ContentTemplate>
<table style="font-family: Verdana; font-size: 100%;">
<tr>
<td align="center" class="style5" style="color: White; background-color: #5D7B9D;
font-weight: bold;">
Complete
</td>
</tr>
<tr>
<td class="style1">
Your account request was successfully submitted. Please download the
<a href="../Exhibit1.pdf">form</a> and return it. You shoud receive an email response within 3 business days.
Thank you.
</td>
</tr>
<tr>
<td align="right" class="style1">
<asp:Button ID="ContinueButton" runat="server" BackColor="#FFFBFF" BorderColor="#CCCCCC"
BorderStyle="Solid" BorderWidth="1px" CausesValidation="False" CommandName="Continue"
Font-Names="Verdana" ForeColor="#284775" Text="Download Form" ValidationGroup="CreateUserWizard1"
PostBackUrl="~/admin/DownloadFile.aspx" />
</td>
</tr>
</table>
</ContentTemplate>你看,这段代码根本不能工作。此外,PostBackUrl="~/admin/DownloadFile.aspx“也不起作用,它也会进入登录页面。我听说我们启用了Javascript之类的东西。但如何更改我的代码,因为它不在代码背后。
非常感谢。
发布于 2012-02-07 06:22:43
~/Admin/DownloadFile.aspx似乎是受保护的,用户没有权限整体访问此文件或管理员位置。
你可以把你的DownLoadFile.aspx放在不受限制的地方
https://stackoverflow.com/questions/9168115
复制相似问题