Position Web control within Panel on Web Form ... programatically

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • M-

    #1

    Position Web control within Panel on Web Form ... programatically

    Is it possible to position a Web Form control within a
    Panel ... programatticall y? That is, by adding lines to
    the following code:


    protected System.Web.UI.W ebControls.Pane l Panel1;

    private void Page_Load(objec t sender, System.EventArg s e)
    {
    Panel1.BackColo r= System.Drawing. Color.White;
    Panel1.Height=9 5;
    Panel1.Width=20 0;
    System.Web.UI.W ebControls.Drop DownList DDL1 = new
    DropDownList();
    DDL1.Height=30;
    DDL1.Width=120;
    Panel1.Controls .Add(TB2);
    }

    or, some other way?

    Thanks.

  • M-

    #2
    Position Web control within Panel on Web Form ... programatically

    An sample code - server-side or client-side would be
    appreciated.

    [color=blue]
    >-----Original Message-----
    >Is it possible to position a Web Form control within a
    >Panel ... programatticall y? That is, by adding lines to
    >the following code:
    >
    >
    >protected System.Web.UI.W ebControls.Pane l Panel1;
    >
    >private void Page_Load(objec t sender, System.EventArg s e)
    >{
    > Panel1.BackColo r= System.Drawing. Color.White;
    > Panel1.Height=9 5;
    > Panel1.Width=20 0;
    > System.Web.UI.W ebControls.Drop DownList DDL1 = new
    >DropDownList() ;
    > DDL1.Height=30;
    > DDL1.Width=120;
    > Panel1.Controls .Add(TB2);
    >}
    >
    >or, some other way?
    >
    >Thanks.
    >
    >.
    >[/color]

    Comment

    Working...