title: Getting values from Dynamic controls in Grid view
body: <p>I am generating a Gridview with Custom controls (Text boxes) as per the user input during the run time. when i try to access the data in those text boxes, its not happening</p>
  
  <p>I had triggered this operations with the Button and the code is as follows:</p>
  
  <p>for (int rowCount = 0; rowCount &lt;= gvCapacity.Rows.Count; rowCount++)
     {
        for (int i = 1; i &lt; gvCapacity.Columns.Count; i++)
          {
             if (i > rowCount)
              {
              if (!(gvCapacity.Columns[i].HeaderText == "Route" &amp;&amp; gvCapacity.Columns[i].HeaderText == "Location" &amp;&amp; gvCapacity.Columns[i].HeaderText == "RouteLocationID"))
                 {
                 TextBox txtBox = gvCapacity.Rows[rowCount].Cells[i].FindControl("txt" + gvCapacity.Columns[i].HeaderText) as TextBox;<br>
                  }
            }
       }</p>
  
  <p>It returns the Null value when i try to access the textbox data. 
  Can anyone help me out on this. </p>
  
  <p>Regards
  Geeta</p>