Panel Server Control...

P

Pai

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
 
K

Ken Cox [Microsoft MVP]

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



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
 
P

Pai

Ken Cox said:
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



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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top