int iIndex;TextBox txt5, txt6, txt7, txt8, txt9, txt10;
for (int i=1; i<=8; i++)
{
switch(1)
{
case 1: iIndex = 5; break;
case 2: iIndex = 11; break;
case 3: iIndex = 17; break;
case 4: iIndex = 24; break;
case 5: iIndex = 27; break;
case 6: iIndex = 55; break;
case 7: iIndex = 41; break;
case 8: iIndex = 47; break;
}
txt5 = (TextBox)LMFindControl("txtF"+(iIndex).ToString(), this);
txt6 = (TextBox)LMFindControl("txtF"+(iIndex+1).ToString(), this);
txt7 = (TextBox)LMFindControl("txtF"+(iIndex+2).ToString(), this);
txt8 = (TextBox)LMFindControl("txtF"+(iIndex+3).ToString(), this);
txt9 = (TextBox)LMFindControl("txtF"+(iIndex+4).ToString(), this);
txt10 = (TextBox)LMFindControl("txtF"+(iIndex+5).ToString(), this);}

浙公网安备 33010602011771号