2.0: simple menu generates error

R

RAM

Hello,
I have created simple ASP.NET application with master page
MIMStock.master:

<%@ Master Language="C#" AutoEventWireup="true" %>
<!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 id="Head" runat="server">
<title>MIM Stock</title>
<link rel="Stylesheet" type="text/css" href="Styles.css" />
</head>
<body class="WithBackground">
<asp:SiteMapDataSource ID="Map" runat="server"
ShowStartingNode="false" />
<asp:Menu ID="Menu" runat="server" DataSourceID="Map"
Orientation="Horizontal">
</asp:Menu>
<asp:SiteMapPath ID="Path" runat="server"
Font-Size="Smaller"
RootNodeStyle-ForeColor="Black"
NodeStyle-ForeColor="Black" />
<br />
<asp:ContentPlaceHolder ID="ContentPlaceHolder" runat="server"
/>
</body>
</html>

Then I use master page on Default.aspx:

<%@ Page Language="C#" MasterPageFile="~/MIMStock.master"
AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="DefaultPage" %>
<asp:Content ID="Content" ContentPlaceHolderID="ContentPlaceHolder"
runat="server">
<h2>Welcome!</h2>
</asp:Content>

This code generates error when entering page Default.aspx:

Message: Exception of type 'System.Web.HttpUnhandledException' was
thrown.

But after removing asp:Menu from MIMStock.master page is displayed
correctly.
Could you explain me please this phenomena?
I really need to use menu.
/RAM/
 

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,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top