How do I add value attribute to checkbox in asp.net that is added dynamically to a panel. Eg:
CheckBoxList chkIrList = new CheckBoxList();
chkIrList.DataValueField = "UserId";
chkIrList.DataTextField = "Name";
chkIrList.DataSource = DT;
chkIrList.DataBind();
The generated html does not holds the value field:
<input id="ctl26_0" type="checkbox" name="ctl26$0">
<label for="ctl26_0">XYZ</label>
Aucun commentaire:
Enregistrer un commentaire