ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2019 All rights reserved.ASP.Net DataList Item FindControl error: Object reference not set to an instance of an object<blockquote><cite>akhter says:</cite> <pre><code class="csharp spaces"></code><code class="csharp plain">Label customerID = item.FindControl(</code><code class="csharp string">"CustomerID"</code><code class="csharp plain">) </code><code class="csharp keyword">as</code> <code class="csharp plain">Label;</code></pre> </blockquote> <p>&nbsp;Change above line of code using below line. You are finding wrong id.</p> <pre class="brush: csharp">Label customerID = item.FindControl(&#34;lblID&#34;) as Label;</pre> <p>&nbsp;</p>, 22 Aug 2019 08:04:45 GMT