Click here to Skip to main content
15,923,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The radio button is showing like below.first showing Text and below Radio button(RB)

Male Female
RB RB

not showing in same line like :

Male RB Female RB


my code is as follows


tc = new TableCell();
tc1 = new TableCell();
tc.Text = FieldeDescr;

RadioButtonList rbl = new RadioButtonList();
rbl.ID = "rblID";

//Add Items
rbl.Items.Add(new ListItem("Male", "1"));
rbl.Items.Add(new ListItem("Female", "2"));

rbl.RepeatDirection = RepeatDirection.Horizontal;
rbl.TextAlign = TextAlign.Left;

rbl.DataBind();
tc1.Controls.Add(rbl);
tr.Cells.Add(tc);
tr.Cells.Add(tc1);
Posted
Updated 21-May-15 1:22am
v4
Comments
Abhipal Singh 21-May-15 7:47am    
Can you provide code of the ASP "table" container in which you are adding this RadioButtonList?

1 solution

Check the width of parent object, try to style it as required.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900