problem with NavigateUrl

J

Jeff

hi

asp.net 3.5

On my site I have a menu control where I've put all the menu controls. The
problem is that when staying on one page and navigating to another page,
that page is not found:

If I'm on ~/Pages/MyPage.aspx and wants to navigate to
~/Admin/SqlExceptions.aspx
Then I get an error saying that ~/Pages/SqlExceptions.aspx don't exists - of
course that webpage doesn't exists, it hasa the wrong directory. But I did
specify the correct directory in the mennu control, that makes it more
confusing..

here is markup of the menu controls in trouble:
<asp:RoleGroup Roles="Administrator">
<ContentTemplate>
<asp:Menu ID="Menu1" runat="server" Orientation="Vertical"
SkinID="vertical" StaticDisplayLevels="3">
<Items>
<asp:MenuItem Text="Home" Value=""
NavigateUrl="~/Default.aspx"></asp:MenuItem>
<asp:MenuItem Text="MyPage" Value=""
NavigateUrl="~/Pages/MyPage.aspx"></asp:MenuItem>
</Items>
</asp:Menu>
<div style="text-align:center; background-color:#3399FF; color:White;
margin-top:5px; font-family:Verdana; padding-bottom:5px; padding-top:5px;
font-size:12px;">
Administrator
</div>
<asp:Menu ID="Menu2" runat="server" Orientation="Vertical"
SkinID="vertical" StaticDisplayLevels="3">
<Items>
<asp:MenuItem Text="Users" Value=""
NavigateUrl="~/Admin/ManageUsers.aspx"></asp:MenuItem>
<asp:MenuItem Text="SqlExceptions" Value=""
NavigateUrl="~/Admin/SqlExceptions.aspx"></asp:MenuItem>
<asp:MenuItem Text="Statistics" Value=""
NavigateUrl="~/Admin/StatisticList.aspx"></asp:MenuItem>
</Items>
</asp:Menu>
</ContentTemplate>
</asp:RoleGroup>

any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top