JonJacobs 0 Newbie Poster

I have a Web page named Menu.aspx on which I have a (gasp) Menu control. It is bound to an XMLDataSource control, which is bound to an XML file.
My problem is that clicking the menu item does not navigate to another page. It just flickers and re-displays the current page.

Here is the XML file:
<?xml version="1.0" encoding="utf-8" ?>
<MenuItems>
<Search text="Search" url="Search.aspx"/>
</MenuItems>

Search.aspx exists in the same Web site in the same (top level) folder as Menu.aspx.
Search.aspx is super simple and displays seperately just fine.

Here is the source for Menu.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Menu.aspx.cs" Inherits="Menu" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Main Menu</title>
</head>
<body background="b19marbles002.jpg">
<form id="form1" runat="server">
<div>
<h1>Main Menu</h1>
<asp:Menu ID="Menu1" runat="server" DataSourceID="XmlDataSource1"
StaticDisplayLevels="2">
</asp:Menu>
<asp:XmlDataSource ID="XmlDataSource1" runat="server"
DataFile="~/App_Data/MenuItems.xml" XPath="/MenuItems/*">
</asp:XmlDataSource>

</div>
</form>
</body>
</html>

Why doesn't my menu work? I tried variations on the url, such as ulr="~/Search.aspx" but no variation I tried worked.
What am I missing?

Thanks,
Jon

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.