Setting label text in listview control in loggedin template
<p>I need to set a label text which is listview and the listview is in Logged in template.
I am unable to set the value of the label. Here is the below code.</p>

<pre><code>ListView ListView1 = (ListView)LoginView.FindControl("ListView1");

for (int i = 0; i &lt; ListView1.Controls.Count; i++)
{
    Label someLabel = (Label)ListView1.Controls[i].FindControl("nItemsId");
    if (someLabel != null)
        someLabel.Text = dt.Rows.Count.ToString();
}
</code></pre>
