Panel Server Control...

Discussion in 'ASP .Net Web Controls' started by Pai, Aug 26, 2003.

  1. Pai

    Pai Guest

    Hello there,

    I have a Panel and I have created checkboxes dynamically and added it
    to the panel.

    The code is as below:

    foreach (...)
    {
    My_Roles = new CheckBox();
    My_Roles.ID = my_role.Name;
    My_Roles.Text = my_role.Name;
    My_Roles.AutoPostBack = true;
    Panel1.Controls.Add(My_Roles);
    }

    The Checkboxes get added one after another, I would like the controls
    to be added one below another.

    Is there any property of the Panel which needs to be set for the same.

    Any suggestions please.

    Kind Regards,
    Srikanth Pai
    Pai, Aug 26, 2003
    #1
    1. Advertising

  2. How about inserting a literal control after each checkbox with the literal
    control's text value as "<br>"?

    --
    Microsoft MVPs have a question for *you*: Are you patched against the Worm?
    http://www.microsoft.com/security/security_bulletins/ms03-026.asp



    "Pai" <> wrote in message
    news:...
    Hello there,

    I have a Panel and I have created checkboxes dynamically and added it
    to the panel.

    The code is as below:

    foreach (...)
    {
    My_Roles = new CheckBox();
    My_Roles.ID = my_role.Name;
    My_Roles.Text = my_role.Name;
    My_Roles.AutoPostBack = true;
    Panel1.Controls.Add(My_Roles);
    }

    The Checkboxes get added one after another, I would like the controls
    to be added one below another.

    Is there any property of the Panel which needs to be set for the same.

    Any suggestions please.

    Kind Regards,
    Srikanth Pai
    Ken Cox [Microsoft MVP], Aug 27, 2003
    #2
    1. Advertising

  3. Pai

    Pai Guest

    "Ken Cox [Microsoft MVP]" <> wrote in message news:<>...
    > How about inserting a literal control after each checkbox with the literal
    > control's text value as "<br>"?
    >
    > --
    > Microsoft MVPs have a question for *you*: Are you patched against the Worm?
    > http://www.microsoft.com/security/security_bulletins/ms03-026.asp
    >
    >
    >
    > "Pai" <> wrote in message
    > news:...
    > Hello there,
    >
    > I have a Panel and I have created checkboxes dynamically and added it
    > to the panel.
    >
    > The code is as below:
    >
    > foreach (...)
    > {
    > My_Roles = new CheckBox();
    > My_Roles.ID = my_role.Name;
    > My_Roles.Text = my_role.Name;
    > My_Roles.AutoPostBack = true;
    > Panel1.Controls.Add(My_Roles);
    > }
    >
    > The Checkboxes get added one after another, I would like the controls
    > to be added one below another.
    >
    > Is there any property of the Panel which needs to be set for the same.
    >
    > Any suggestions please.
    >
    > Kind Regards,
    > Srikanth Pai


    thanks it did work.

    Kind Regards,
    Srikanth
    Pai, Aug 27, 2003
    #3
    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. Harry
    Replies:
    3
    Views:
    541
    Harry Singh
    Nov 10, 2003
  2. HS1
    Replies:
    3
    Views:
    486
  3. Ulf Meinhardt
    Replies:
    0
    Views:
    609
    Ulf Meinhardt
    Jul 7, 2009
  4. Robin Wenger
    Replies:
    0
    Views:
    2,926
    Robin Wenger
    Aug 18, 2011
  5. PHP2
    Replies:
    4
    Views:
    119
Loading...

Share This Page