I
iHavAQuestion
I actually need to do the below for 10 controls
ddlInsuranceCompany1.SelectedItem.Text = Value;
txtPolicy1.Text = value;
SO i opted for a for loop
My question is how do i add contol + increment
ddlInsuranceCompany + integer
The below code does do not work can anyone plz hep me out
for (int iCount = 0; iCount < 10; iCount++)
{
int iControls = iCount + 1;
ddlInsuranceCompany + (iControls).SelectedItem.Text
= ilist.Tables[0].Rows[iCount]["InsurComp_TEXT"].ToString();
txtPolicy+ (iControls).Text =
ilist.Tables[0].Rows[iCount]["PoliciesNum_INT"].ToString();
}
ddlInsuranceCompany1.SelectedItem.Text = Value;
txtPolicy1.Text = value;
SO i opted for a for loop
My question is how do i add contol + increment
ddlInsuranceCompany + integer
The below code does do not work can anyone plz hep me out
for (int iCount = 0; iCount < 10; iCount++)
{
int iControls = iCount + 1;
ddlInsuranceCompany + (iControls).SelectedItem.Text
= ilist.Tables[0].Rows[iCount]["InsurComp_TEXT"].ToString();
txtPolicy+ (iControls).Text =
ilist.Tables[0].Rows[iCount]["PoliciesNum_INT"].ToString();
}