I use linwq to sql,i dynamicallu create textobes and radiobuttons as per value of database,
here is my code for that
var r = from a in db.EMR_EVENTs
where a.EventID == (int)Session["eventid"]
select new
{
No_Of_Extra_Invitee=a.Allowed_guest_per_invitee
};
var ev1 = r.First();
int? count = ev1.No_Of_Extra_Invitee;
int? rowCount = ev1.No_Of_Extra_Invitee;
Session["rc"] = rowCount;
for (int i = 0; i < rowCount; i++)
{
TextBox txtfirstname = new TextBox();
TextBox txtlastname = new TextBox();
TextBox txtemail = new TextBox();
RadioButton chkmale = new RadioButton();
RadioButton chkfemale = new Ra ...
Go to the complete details ...