I have many checkboxes having text as substring from a long message. This I have done to select necessary strings from the long message and finally combined into required message , which I know how to do.
I want to know how to display these checkboxes , each in new line. How can i display them inside div , each checkbox in new line.
string[] longMsg = str.Split('*'); //Message contains * character as delimiter
for (int i = 0; i < longMsg.Length; i++)
{
CheckBox cb = new CheckBox();
cb.Text = longMsg[i];
Form.Controls.Add(cb);
}
Right now on Form.Controls.Add(cb) results in displaying them in serial manner . Please help what should I do on aspx page and .cs page. Thanks , need your help ..
Try this