title: Multiple Textbox values into database
body: <p>I have multiple textboxes in my form like txtTask0, txtTask1... txtTask12.</p>
  
  <p>so I want to pass values of those textboxes into my webservice one by one.</p>
  
  <pre><code>for (int i = 0; i &lt;= 12 ; i++)
  {
     sOUT = ws_service.InsertAchievement(i,txtTask0.Text,txtAchieve0.Text);              
  }
  </code></pre>
  
  <p>Here instead of passing txtTask0.text I need to pass the "i" value one by one like </p>
  
  <pre><code>txtTask[i].text
  </code></pre>
  
  <p>something similar to this</p>
  
  <pre><code>TextBox tb = (TextBox) Controls["txtTask" + i];
  </code></pre>
  
  <p>from this <a href="https://stackoverflow.com/questions/8022724/textbox-values-to-array">link</a>
  But that code results in error like </p>
  
  <pre><code>Error   92  The best overloaded method match for 'System.Web.UI.ControlCollection.this[int]' has some invalid arguments 
  </code></pre>
  
  <p>How can I pass multiple textbox values into the loop.?</p>