Controlling Placeholder Position

Discussion in 'ASP .Net' started by John Spiegel, Mar 4, 2004.

  1. John Spiegel

    John Spiegel Guest

    Hi all,

    How can you control where a placeholder is positioned on a Web Form? AFAIK,
    It doesn't seem to support a style or other positioning (or even sizing)
    attributes.

    TIA,

    John
     
    John Spiegel, Mar 4, 2004
    #1
    1. Advertising

  2. A PlaceHolder doesn't render any HTML. Therefore, it doesn't have a
    position.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "John Spiegel" <> wrote in message
    news:#...
    > Hi all,
    >
    > How can you control where a placeholder is positioned on a Web Form?

    AFAIK,
    > It doesn't seem to support a style or other positioning (or even sizing)
    > attributes.
    >
    > TIA,
    >
    > John
    >
    >
     
    Kevin Spencer, Mar 4, 2004
    #2
    1. Advertising

  3. John Spiegel

    Stanley Guest

    If you want to use a PlaceHolder and position it try adding a litercontrol
    to it at run-time and use a span tag around your controls you want to place
    in the PlaceHolder.

    myPlaceHolder.Controls.Add(New LiteralControl("<span
    style=""position:absolute;left:100;top:120;"">"))
    myPlaceHolder.Controls.Add(MyNewControl)
    myPlaceHolder.Controls.Add(New LiteralControl("</span>"))

    -Stanley

    "John Spiegel" <> wrote in message
    news:%...
    > Hi all,
    >
    > How can you control where a placeholder is positioned on a Web Form?

    AFAIK,
    > It doesn't seem to support a style or other positioning (or even sizing)
    > attributes.
    >
    > TIA,
    >
    > John
    >
    >
     
    Stanley, Mar 4, 2004
    #3
  4. John Spiegel

    John Spiegel Guest

    Thanks, gentlemen. I was reading an example where I think the author had
    used a Panel instead.

    What would one choose to use a Placeholder for? I see that it allows a
    place to predefine a container that you could programmatically add controls
    to, for example, but a Panel seems to do that same thing with the added
    bonus of being able to position at design time--rather than having to handle
    it yourself w/ a span.

    Thanks again,

    John

    "John Spiegel" <> wrote in message
    news:#...
    > Hi all,
    >
    > How can you control where a placeholder is positioned on a Web Form?

    AFAIK,
    > It doesn't seem to support a style or other positioning (or even sizing)
    > attributes.
    >
    > TIA,
    >
    > John
    >
    >
     
    John Spiegel, Mar 4, 2004
    #4
    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?UGhpbGlwcGUgVi4=?=

    Controlling the srolling bar position in ASP & C#

    =?Utf-8?B?UGhpbGlwcGUgVi4=?=, May 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    465
    Kevin Spencer
    May 17, 2004
  2. Replies:
    2
    Views:
    350
  3. Mario Figueiredo
    Replies:
    1
    Views:
    420
    Jack Klein
    Nov 16, 2006
  4. nail

    Build control in a placeholder or like a placeholder

    nail, Sep 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    361
  5. Thom Little

    PlaceHolder Position

    Thom Little, May 4, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    405
    Thom Little
    May 4, 2004
Loading...

Share This Page