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 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>https://www.aspforums.net:443/Threads/129210/ASPNet-DataList-Item-FindControl-error-Object-reference-not-set-to-an-instance-of-an-object/https://www.aspforums.net:443/Threads/129210/ASPNet-DataList-Item-FindControl-error-Object-reference-not-set-to-an-instance-of-an-object/Thu, 22 Aug 2019 08:04:45 GMT