Ravi Shekhar

Ravi Shekhar

  • 361
  • 4.5k
  • 2.1m

How to get asp textbox values by loop

Jul 4 2013 1:16 AM


Suppose I have 5 textbox named  txtRate1,txtRate2,txtRate3,txtRate3,txtRate3

all are asp control. 
I want to get values using for loop .

for(int i=1; i<=5; i++)
{
string s= ("txtRate"+i).Text;


}

it gives error .

Answers (6)