Href link 到子文件夹

Href link to subfolder

我创建了一个母版页,其中包含一个名为“County_Polices”的子菜单文件夹。在子文件夹中,我有文件“Cty_911_calltaking.aspx”。

在母版页上,我尝试了以下 3 个脚本,none 将打开子文件夹中的 aspx 文件。

 <li><a href="#">911 Calltaking Polices</a>
                                <ul>
                                    <li><li>
                                    <li><a runat="server" href="~/Cty_911_calltaking.aspx">County Police</a></li>
                                    <li><a href="<%=ResolveUrl("~/Cty_911_calltaking.aspx") %>">County Police 1</a></li>
                                    <li><a href="~/County_Polices/Cty_911_calltaking.aspx">County Police 2</a></li>
                                </ul>

我哪里做错了。

这是Cty_911_calltaking.aspx页面的源代码:

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="Cty_911_calltaking.aspx.cs" Inherits="OnCallWeb.County_Polices.Cty_911_calltaking" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style1 {
            width: 100%;
        }
        .auto-style2 {
            text-align: center;
        }
        .auto-style3 {
            font-size: xx-large;
            color: #009999;
        }
        .auto-style4 {
            text-align: center;
            font-size: x-large;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    test<table class="auto-style1">
        <tr>
            <td class="auto-style2"><em><strong><span class="auto-style3">Header</span></strong></em></td>
        </tr>
        <tr>
            <td class="auto-style2">&nbsp;</td>
        </tr>
        <tr>
            <td class="auto-style4">Enter text here</td>
        </tr>
        <tr>
            <td class="auto-style2">&nbsp;</td>
        </tr>
    </table>
&nbsp;
</asp:Content>

忽略我发现的错误。是一个简单的错字。使用以下代码有效:

<li><a href="<%=ResolveUrl("~/County_Polices/Cty_911_calltaking.aspx")%>">County Police 1</a></li>