bug in .NET?

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?
Here's my sitemap:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode title="MIMMagazyn">
<siteMapNode title="Ruchy">
<siteMapNode url="PZ.aspx" title="Przyjecie"/>
<siteMapNode url="PZStorno.aspx" title="Przyjecie - storno"/>
<siteMapNode url="ZW.aspx" title="Zwrot"/>
<siteMapNode url="ZWStorno.aspx" title="Zwrot - storno"/>
<siteMapNode url="RW.aspx" title="Rozchod wewnetrzny"/>
<siteMapNode url="RWStorno.aspx" title="Rozchod wewnetrzny - storno"/>
<siteMapNode url="WZ.aspx" title="Wydanie"/>
<siteMapNode url="WZStorno.aspx" title="Wydanie - storno"/>
<siteMapNode url="MM.aspx" title="Przesuniecie"/>
<siteMapNode url="MMStorno.aspx" title="Przesuniecie - storno"/>
</siteMapNode>
</siteMapNode>
</siteMap>

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top