2.0: simple menu generates error

Discussion in 'ASP .Net Web Controls' started by RAM, Jul 28, 2006.

  1. RAM

    RAM Guest

    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/
     
    RAM, Jul 28, 2006
    #1
    1. Advertising

  2. RAM

    RAM Guest

    solved

    I solved
    U¿ytkownik "RAM" <> napisa³ w wiadomo¶ci
    news:%...
    > 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/
    >
     
    RAM, Aug 7, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Afonin
    Replies:
    0
    Views:
    525
    Peter Afonin
    Aug 30, 2003
  2. =?Utf-8?B?cmFzMjY=?=

    External Assembly accesing Session generates an error

    =?Utf-8?B?cmFzMjY=?=, May 16, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    451
    =?Utf-8?B?cmFzMjY=?=
    May 16, 2006
  3. RAM
    Replies:
    0
    Views:
    312
  4. Vaibhav Shah
    Replies:
    1
    Views:
    515
    bruce barker \(sqlwork.com\)
    Sep 6, 2006
  5. Charles
    Replies:
    6
    Views:
    314
    Roland Pibinger
    Jan 2, 2007
Loading...

Share This Page