public SingleSelectControl(SingleSelect question, RepeatDirection direction) { rbl = new RadioButtonList(); rbl.CssClass = "alternatives"; rbl.ID = "q" + question.ID; rbl.DataTextField = "Title"; rbl.DataValueField = "ID"; rbl.DataSource = question.GetChildren(); rbl.RepeatLayout = RepeatLayout.Flow; rbl.RepeatDirection = direction; rbl.DataBind(); l = new Label(); l.CssClass = "label"; l.Text = question.Title; l.AssociatedControlID = rbl.ID; Controls.Add(l); Controls.Add(rbl); }
public SingleSelectControl(SingleSelect question, RepeatDirection direction) { rbl = new RadioButtonList(); rbl.CssClass = "alternatives"; rbl.ID = "q" + question.ID; rbl.DataTextField = "Title"; rbl.DataValueField = "ID"; rbl.DataSource = question.GetChildren(); rbl.RepeatLayout = RepeatLayout.Flow; rbl.RepeatDirection = direction; rbl.DataBind(); l = new Label(); l.CssClass = "label"; l.Text = question.Title; l.AssociatedControlID = rbl.ID; Controls.Add(l); Controls.Add(rbl); }