<a href=""> and PostBackUrl both are not working</a>

时间:2012-02-06 22:13:54

标签: asp.net

我正在使用asp.net CreateUserWizard来创建门户网站。接口页面如下: Login page

Fill info to apply user account

User name and password created

Completed

在最后一步中,我有一个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 =&#34;〜/ admin / DownloadFile.aspx&#34;也没有用,它也会登录页面。我听说我们启用了Javascript。但是如何改变我的代码,因为它不在代码背后。

非常感谢。

1 个答案:

答案 0 :(得分:1)

似乎~/Admin/DownloadFile.aspx受到保护,用户无权访问此文件或管理员位置。

您可以将DownLoadFile.aspx放在不受限制的区域

相关问题