content placeholder in the masterpage

Discussion in 'ASP .Net' started by Vinnie, Sep 26, 2007.

  1. Vinnie

    Vinnie Guest

    working with asp.net 2.0 C#, once i create a masterpage i'm
    practically unable to resize the content placeholder: can anyone tell
    me what i should do? I tried to resize it by dragging the small
    squares at the border, but it does not allow me to do anything.

    any idea?

    Thanks
     
    Vinnie, Sep 26, 2007
    #1
    1. Advertising

  2. Vinnie

    bruce barker Guest

    the content placeholder is just that a place holder. it doe not render
    any html itself, so it has no size properties. you can place it in a
    panel, and size the panel.

    -- bruce (sqlwork.com)

    Vinnie wrote:
    > working with asp.net 2.0 C#, once i create a masterpage i'm
    > practically unable to resize the content placeholder: can anyone tell
    > me what i should do? I tried to resize it by dragging the small
    > squares at the border, but it does not allow me to do anything.
    >
    > any idea?
    >
    > Thanks
    >
     
    bruce barker, Sep 26, 2007
    #2
    1. Advertising

  3. Vinnie

    Vinnie Guest

    On Sep 26, 11:48 am, bruce barker <> wrote:
    > the content placeholder is just that a place holder. it doe not render
    > any html itself, so it has no size properties. you can place it in a
    > panel, and size the panel.
    >
    > -- bruce (sqlwork.com)
    >



    Hi Bruce,
    this what happens:
    when i add a masterpage to my website, in design view i see on the top
    of the page a rectangle: if i want to place a picture above that
    rectangle i can't; also, if i want to put another placeholder on the
    left side to create a layout like an upside down L (for the logo at
    the top of the page and themenu bars on the left side) i can't becouse
    the first one is too big and covers all the upper side of the page.

    What i wish to do:
    a)create a placeholder in the middle of the page, so i can work on the
    upper side (to insert the logo), the left side (so i can insert the
    menu bars) and the right side (so i can add some text in textboxes);
    b) create another placeholder at the bottom so i can work on the
    content pages to add some stuffs.

    Thanks for your help.
     
    Vinnie, Sep 26, 2007
    #3
  4. Vinnie

    Shelly Guest

    "Vinnie" <> wrote in message
    news:...
    > On Sep 26, 11:48 am, bruce barker <> wrote:
    >> the content placeholder is just that a place holder. it doe not render
    >> any html itself, so it has no size properties. you can place it in a
    >> panel, and size the panel.
    >>
    >> -- bruce (sqlwork.com)
    >>

    >
    >
    > Hi Bruce,
    > this what happens:
    > when i add a masterpage to my website, in design view i see on the top
    > of the page a rectangle: if i want to place a picture above that
    > rectangle i can't; also, if i want to put another placeholder on the
    > left side to create a layout like an upside down L (for the logo at
    > the top of the page and themenu bars on the left side) i can't becouse
    > the first one is too big and covers all the upper side of the page.
    >
    > What i wish to do:
    > a)create a placeholder in the middle of the page, so i can work on the
    > upper side (to insert the logo), the left side (so i can insert the
    > menu bars) and the right side (so i can add some text in textboxes);
    > b) create another placeholder at the bottom so i can work on the
    > content pages to add some stuffs.
    >
    > Thanks for your help.
    >


    Why can't you do what you want. I am just learning asp.net and did that
    right away. My master page has all sorts of stuff above and below the
    content placeholder. It was never a problem.

    Hmm, you are adding placeholders all over the place? I added controls.
    There was only one placeholder in the middle of the body area of the master
    page, and that was satisfied by the content page. If you are doing all this
    with placeholders, then it seems to me that all your actual code will be in
    the content page -- which defeats the purpose of having a master page. At
    least as I understand it, the master page provides the common look and feel
    (logos, placement, etc) and the content page varies with page to page and is
    placed in the content placeholder section of the body.

    Shelly

    Shelly
     
    Shelly, Sep 26, 2007
    #4
  5. "Shelly" <> wrote in message
    news:...

    > At least as I understand it, the master page provides the common look and
    > feel (logos, placement, etc)


    That's correct.

    > and the content page varies with page to page and is placed in the content
    > placeholder section of the body.


    In fact, it's precisely the opposite - this is sometimes a difficult concept
    for people to grasp, especially if they're familiar with HTML framesets...

    A MasterPage is just a UserControl - it's nothing at all like a frameset...

    When you go to a content page, the MasterPage doesn't fill its placeholder
    with the content page - the content page surrounds itself with the
    MasterPage.

    This may sound like the same thing, but it isn't...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
     
    Mark Rae [MVP], Sep 26, 2007
    #5
  6. Vinnie

    Shelly Guest

    "Mark Rae [MVP]" <> wrote in message
    news:%...
    > "Shelly" <> wrote in message
    > news:...
    >
    >> At least as I understand it, the master page provides the common look and
    >> feel (logos, placement, etc)

    >
    > That's correct.
    >
    >> and the content page varies with page to page and is placed in the
    >> content placeholder section of the body.

    >
    > In fact, it's precisely the opposite - this is sometimes a difficult
    > concept for people to grasp, especially if they're familiar with HTML
    > framesets...
    >
    > A MasterPage is just a UserControl - it's nothing at all like a
    > frameset...
    >
    > When you go to a content page, the MasterPage doesn't fill its placeholder
    > with the content page - the content page surrounds itself with the
    > MasterPage.
    >
    > This may sound like the same thing, but it isn't...


    OK, I can understand what you are saying. It is the content page that is
    doing the driving.

    In php it is the same thing (sort of). The way I code, at least, the
    content page will pull in the surrounding stuff through including their
    files. Those surrounding files make up a template, which is akin to the
    master page.

    Here, in aspx, it is the content pages that says "Oh, I am inside a content
    control. I better look to see what Master Page is needed and surround
    myself with that stuff".

    The only difference between the fill in and surround it, is who is behind
    the wheel and who is in the shotgun seat.

    Shelly
     
    Shelly, Sep 26, 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. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    MasterPage -> Page -> MasterPage Code Access

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Apr 10, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    7,951
    Steven Cheng[MSFT]
    Apr 14, 2006
  2. Replies:
    0
    Views:
    411
  3. Barkster
    Replies:
    5
    Views:
    432
    Barkster
    Oct 30, 2006
  4. John
    Replies:
    2
    Views:
    947
  5. nail

    Build control in a placeholder or like a placeholder

    nail, Sep 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    372
Loading...

Share This Page