random content pages shown, but never both

Discussion in 'ASP .Net' started by qa4ever, Apr 1, 2008.

  1. qa4ever

    qa4ever Guest

    I'm a newbie on VS 2008 .NET

    I have created one master page and two content pages. The problem is that
    either the Head (i.e the menu) is displayed or the Main (with contain a
    datalist etc. ).
    The probablity appears to be fifty-fifty and random. I never see both two,
    which I had expect.
    There is no design nor runtime error.

    Menu
    or
    Main

    ....but not ....

    Menu
    Main


    Is there any known bug in the .net asp framework in this area?

    <%@ Master Language="C#" AutoEventWireup="true"
    CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
    <!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>TV-Shoppen</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <asp:ContentPlaceHolder id="Head" runat="server">
    </asp:ContentPlaceHolder>
    </div>
    <div>
    <asp:ContentPlaceHolder id="Main" runat="server">
    </asp:ContentPlaceHolder>
    </div>
    </form>
    ....


    Whole menu.aspx
    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="true" CodeFile="Menu.aspx.cs" Inherits="Default2"
    Title="Content Page Menu"%>
    <asp:Content ID="Content1" ContentPlaceHolderID="Head" Runat="Server">
    <asp:Menu runat="server" >
    <Items>
    <asp:MenuItem Text="ItemAdmin" Value="ItemAdmin"></asp:MenuItem>
    <asp:MenuItem Text="Shop" Value="Shop"></asp:MenuItem>
    </Items>
    </asp:Menu>
    </asp:Content>


    Start of default.aspx
    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
    Title="Content Page Body"%>
    <asp:Content ID="Content2" ContentPlaceHolderID="Main" Runat="Server">
    <asp:DataList ID="DataList1" runat="server"
    .....
    </asp:Content>

    Thank you,
    /qa4ever
    qa4ever, Apr 1, 2008
    #1
    1. Advertising

  2. qa4ever

    qa4ever Guest

    Appreciate if somebody could answer.

    /qa4ever

    "qa4ever" <> wrote in message
    news:...
    > I'm a newbie on VS 2008 .NET
    >
    > I have created one master page and two content pages. The problem is that
    > either the Head (i.e the menu) is displayed or the Main (with contain a
    > datalist etc. ).
    > The probablity appears to be fifty-fifty and random. I never see both two,
    > which I had expect.
    > There is no design nor runtime error.
    >
    > Menu
    > or
    > Main
    >
    > ...but not ....
    >
    > Menu
    > Main
    >
    >
    > Is there any known bug in the .net asp framework in this area?
    >
    > <%@ Master Language="C#" AutoEventWireup="true"
    > CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
    > <!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>TV-Shoppen</title>
    > </head>
    > <body>
    > <form id="form1" runat="server">
    > <div>
    > <asp:ContentPlaceHolder id="Head" runat="server">
    > </asp:ContentPlaceHolder>
    > </div>
    > <div>
    > <asp:ContentPlaceHolder id="Main" runat="server">
    > </asp:ContentPlaceHolder>
    > </div>
    > </form>
    > ...
    >
    >
    > Whole menu.aspx
    > <%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
    > AutoEventWireup="true" CodeFile="Menu.aspx.cs" Inherits="Default2"
    > Title="Content Page Menu"%>
    > <asp:Content ID="Content1" ContentPlaceHolderID="Head" Runat="Server">
    > <asp:Menu runat="server" >
    > <Items>
    > <asp:MenuItem Text="ItemAdmin" Value="ItemAdmin"></asp:MenuItem>
    > <asp:MenuItem Text="Shop" Value="Shop"></asp:MenuItem>
    > </Items>
    > </asp:Menu>
    > </asp:Content>
    >
    >
    > Start of default.aspx
    > <%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
    > AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
    > Title="Content Page Body"%>
    > <asp:Content ID="Content2" ContentPlaceHolderID="Main" Runat="Server">
    > <asp:DataList ID="DataList1" runat="server"
    > ....
    > </asp:Content>
    >
    > Thank you,
    > /qa4ever
    qa4ever, Apr 7, 2008
    #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. Soren Kuula
    Replies:
    1
    Views:
    445
    Henry S. Thompson
    Dec 1, 2005
  2. Kevin
    Replies:
    4
    Views:
    421
    Irrwahn Grausewitz
    Oct 17, 2003
  3. globalrev
    Replies:
    4
    Views:
    753
    Gabriel Genellina
    Apr 20, 2008
  4. Mete Akalýn
    Replies:
    1
    Views:
    408
    Mete Akalýn
    Jul 25, 2003
  5. VK
    Replies:
    15
    Views:
    1,154
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page