Can't access a control from LoginTemplate in LoginView
<p>Code in aspx page</p>

<pre><code>&lt;asp:LoginView ID="loginView1" runat="server" EnableViewState="false"&gt;

          &lt;LoggedInTemplate&gt;
                &lt;asp:Button ID="btnWatchlist" runat="server" Text="+ Watchlist"  /&gt;
                &lt;asp:Button ID="btnPM" runat="server" Text="PM" /&gt;
                &lt;asp:Button ID="btnEdit" runat="server" Text="Edit" /&gt;
                &lt;asp:Button ID="btnReport" runat="server" Text="Report" /&gt;
          &lt;/LoggedInTemplate&gt;
&lt;/asp:LoginView&gt;
</code></pre>

<p>Code in aspx.cs(Codebehind) to acccess the button id's</p>

<pre><code>Button watchList = (Button)loginView1.FindControl("btnWatchlist");
Button pm = (Button)loginView1.FindControl("btnPM");
Button report = (Button)loginView1.FindControl("btnReport");
Button edit = (Button)loginView1.FindControl("btnEdit");
</code></pre>

<p>watchList,pm,report,edit is getting null values.Any mistake in my code?</p>

<p>Thanks in Advance..</p>
