Master page questions

Discussion in 'ASP .Net' started by =?Utf-8?B?QW50?=, Oct 20, 2007.

  1. Hi,
    I'm a newbie to the Master page. When i drag an image directly onto the
    master page from say my image folder, it is reflected in all pages which use
    it, however, if I drag a table, layout, image control etc onto the master
    page, I don't see these added to any of the pages that is using the Master
    page as a template even after I save & rebuild.

    Is this expected bahaviour & if so, how do I set up say, menus using a
    layout or table & some hyperlinks?

    Many thanks from a confused newbie :)

    Ant
     
    =?Utf-8?B?QW50?=, Oct 20, 2007
    #1
    1. Advertising

  2. "Ant" <> wrote in message
    news:...

    > I'm a newbie to the Master page. When i drag an image directly onto the
    > master page from say my image folder, it is reflected in all pages which
    > use
    > it, however, if I drag a table, layout, image control etc onto the master
    > page, I don't see these added to any of the pages that is using the Master
    > page as a template even after I save & rebuild.
    >
    > Is this expected bahaviour & if so, how do I set up say, menus using a
    > layout or table & some hyperlinks?


    Please post your MasterPage's markup...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Oct 20, 2007
    #2
    1. Advertising

  3. Hi Mark,

    Below is the Master pages markup you requested.

    Two images exist on the page. I dragged both onto the same area of the
    Master page, however one was dragged directly from an image file, the other
    is an image control linking to an image. The latter is the one that doesn't
    display in pages.
    I have renamed the images ImageFile.jpg & ImageInImageControl.jpg for clarity.

    I appreciate your help here

    Ant


    <body>
    <form id="form1" runat="server">
    <div>
    &nbsp; <br />

    <img src="Images/ImageFile.jpg" style="z-index: 100; left: 54px;
    position: absolute;
    top: 12px" />
    <br />
    <br />
    <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">

    <asp:Image ID="Image1" runat="server"
    ImageUrl="~/Images/ImageInImageControl.jpg" Style="z-index: 100;
    left: 793px; position: absolute; top: 53px" />
    </asp:contentplaceholder>

    </div>
    </form>
    </body>



    "Mark Rae [MVP]" wrote:

    > "Ant" <> wrote in message
    > news:...
    >
    > > I'm a newbie to the Master page. When i drag an image directly onto the
    > > master page from say my image folder, it is reflected in all pages which
    > > use
    > > it, however, if I drag a table, layout, image control etc onto the master
    > > page, I don't see these added to any of the pages that is using the Master
    > > page as a template even after I save & rebuild.
    > >
    > > Is this expected bahaviour & if so, how do I set up say, menus using a
    > > layout or table & some hyperlinks?

    >
    > Please post your MasterPage's markup...
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    >
    >
     
    =?Utf-8?B?QW50?=, Oct 20, 2007
    #3
  4. Ant wrote:
    > Hi,
    > I'm a newbie to the Master page. When i drag an image directly onto the
    > master page from say my image folder, it is reflected in all pages which use
    > it, however, if I drag a table, layout, image control etc onto the master
    > page, I don't see these added to any of the pages that is using the Master
    > page as a template even after I save & rebuild.
    >
    > Is this expected bahaviour & if so, how do I set up say, menus using a
    > layout or table & some hyperlinks?
    >
    > Many thanks from a confused newbie :)
    >
    > Ant


    Master pages are not templates. What you put in the master page is not
    copied to the content page. It's used when the page is executed to
    render the response.

    If you put some element on the master page that doesn't have any content
    or size, of course they will not be visible when you preview the content
    page.

    --
    Göran Andersson
    _____
    http://www.guffa.com
     
    =?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?=, Oct 20, 2007
    #4
  5. "Ant" <> wrote in message
    news:...

    > Two images exist on the page. I dragged both onto the same area of the
    > Master page,


    I'm afraid you didn't - the second one is actually *inside* your
    <asp:ContentPlaceHolder> tag. Depending on what you're trying to do here,
    you'll need to either move the second image out of the
    <asp:ContentPlaceHolder> tag so that it will appear in each content page
    which uses this MasterPage, or place it in the <asp:Content> section of the
    individual content page(s) where you want it to appear...

    http://msdn2.microsoft.com/en-us/library/wtxbf3hh(vs.80).aspx
    http://www.odetocode.com/Articles/419.aspx


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Oct 20, 2007
    #5
  6. "Göran Andersson" wrote:

    Thanks for the idea but i actually have put various controls in the
    tables/layouts but they werent visible. i even put controls straight on the
    form e.g. image control, but it didn't show in the asp page.

    Thanks kindly for the idea though


    > >
    > > Ant

    >
    > Master pages are not templates. What you put in the master page is not
    > copied to the content page. It's used when the page is executed to
    > render the response.
    >
    > If you put some element on the master page that doesn't have any content
    > or size, of course they will not be visible when you preview the content
    > page.
    >
    > --
    > Göran Andersson
    > _____
    > http://www.guffa.com
    >
     
    =?Utf-8?B?QW50?=, Oct 20, 2007
    #6
    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. Doug McCann
    Replies:
    1
    Views:
    1,045
    William Brogden
    Aug 5, 2004
  2. Replies:
    1
    Views:
    3,224
    PeterKellner
    May 16, 2006
  3. Zeba
    Replies:
    1
    Views:
    501
    Mark Rae
    Feb 22, 2007
  4. Nathan Sokalski
    Replies:
    25
    Views:
    1,445
    Nathan Sokalski
    Mar 4, 2010
  5. SerpentKiss2010
    Replies:
    0
    Views:
    2,499
    SerpentKiss2010
    Apr 6, 2011
Loading...

Share This Page