ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.ASP.Net GridView cell value Error: Input string was not in a correct format<p>Hi&nbsp;ada20,</p> <blockquote><cite>ada20 says:</cite> <pre><code class="csharp keyword">int</code> <code class="csharp plain">FacturaId = Int32.Parse(row.Cells[0].Text);</code></pre> </blockquote> <p>You are using&nbsp;ItemTemplate and trying to access from Cell Text property. Thats why the error. You can't access with cell value.</p> <p>Use Find control method to find the Control in the row and from that control get the Text.</p> <p>Use the below code.</p> <pre class="brush: csharp">int FacturaId = Int32.Parse((row.FindControl(&#34;lblId&#34;) as Label).Text);</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/223928/ASPNet-GridView-cell-value-Error-Input-string-was-not-in-a-correct-format/https://www.aspforums.net:443/Threads/223928/ASPNet-GridView-cell-value-Error-Input-string-was-not-in-a-correct-format/Mon, 03 Jun 2019 08:23:15 GMT