I'm building an exemption request form that populates from an SQL Server 2008 database.
DataRow[] exemption = ds.Tables[2].Select();
foreach (DataRow dr in exemption)
{
string exemptionType = dr["ExemptionType"].ToString();
string exemptionID = dr["ExemptionID"].ToString();
string exemptionDesc = dr["ExemptionDescription"].ToString();
string displayLabel = dr["DisplayLabel"].ToString();
sb.Append("<table align='center' width='730px'>");
sb.Append("<tr><td><asp:CheckBox ID=\"chk" + exemptionID + "\" runat=\"server\" /></td>");
sb.Append("<td><strong>" + exemptionDesc + "</strong></td>");
sb.Append("</table>");
sb.Append("<table align='center' width='630px'>");
sb.Append("<tr><td>" + displayLabel + "</td></tr>");
sb.Append("</table>");
}
return sb.ToString();
As it stands right now, the table builds fine, all the data displays fine, but the checkbox does not show up. Was wondering if doing it this way is possible at all, and if so, what am I doing wrong?