Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > 2.0: simple menu generates error

Reply
Thread Tools

2.0: simple menu generates error

 
 
RAM
Guest
Posts: n/a
 
      07-28-2006
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/


 
Reply With Quote
 
 
 
 
RAM
Guest
Posts: n/a
 
      08-07-2006
I solved
Użytkownik "RAM" <(E-Mail Removed)> napisał w wiadomości
news:%(E-Mail Removed)...
> 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/
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Long call to webservice generates "underlying connection was closed: An unexpected error occurred on a receive."Error Techsatish ASP .Net Web Services 1 09-22-2006 03:18 AM
2.0: simple menu generates error RAM ASP .Net 0 07-28-2006 05:31 PM
External Assembly accesing Session generates an error =?Utf-8?B?cmFzMjY=?= ASP .Net 2 05-16-2006 03:22 PM
Internet explorer will not open, generates error box Tom Tricep Computer Support 1 10-19-2005 11:19 PM
Impersonation generates "Invalid Cast" error Peter Afonin ASP .Net 0 08-30-2003 10:39 PM



Advertisments