string rb1 = string.Empty; string rb2 = string.Empty; string rb3 = string.Empty; string rb4 = string.Empty; Label LblChoiceA = new Label(); Label LblChoiceB = new Label(); Label LblChoiceC = new Label(); Label LblChoiceD = new Label(); string options = string.Empty; StringBuilder htmltable = new StringBuilder(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { htmltable.AppendFormat("<table border='0'><tr><td colspan='4'>{0}) {1}</td></tr><tr><td class='col-12'><input type='radio' id='" + rb1 + "{0}' name='" + options + "{0}' value='A' /> A) <label for='" + rb1 + "{0}' id='" + LblChoiceA + "'>{2}</label></td></tr><tr><td class='col-12'><input type='radio' id='" + rb2 + "{0}' name='" + options + "{0}' value='B' /> B) <label for='" + rb2 + "{0}' id='" + LblChoiceB + "'>{3}</label></td></tr><tr><td class='col-12'><input type='radio' id='" + rb3 + "{0}' name='" + options + "{0}' value='C' /> C) <label for='" + rb3 + "{0}' id='" + LblChoiceC + "'>{4}</label></td></tr><tr><td class='col-12'><input type='radio' id='" + rb4 + "{0}' name='" + options + "{0}' value='D' /> D) <label for='" + rb4 + "{0}' id='" + LblChoiceD + "'>{5}</label></td></tr></table>", ds.Tables[0].Rows[i]["QuestionNumber"], ds.Tables[0].Rows[i]["Question"], ds.Tables[0].Rows[i]["ChoiceA"], ds.Tables[0].Rows[i]["ChoiceB"], ds.Tables[0].Rows[i]["ChoiceC"], ds.Tables[0].Rows[i]["ChoiceD"]); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)