I have created a masterpage with a submenu folder called “County_Polices”. Within the subfolder I have the file “Cty_911_calltaking.aspx”.
On the master page I have tried the 3 below scripts and none will open up the aspx file within the subfolder.
<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>
What am I doing wrong.
This is the source code of the Cty_911_calltaking.aspx page:
<%@ 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"> </td>
</tr>
<tr>
<td class="auto-style4">Enter text here</td>
</tr>
<tr>
<td class="auto-style2"> </td>
</tr>
</table>
</asp:Content>
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Disregard I found the error. Was a simple typo. Using the below code works:
<li><a href="<%=ResolveUrl("~/County_Polices/Cty_911_calltaking.aspx")%>">County Police 1</a></li>
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0