regarding signin/signout, is authenticated in asp.net
<p>I am working on login/signup module(FYI no rolls/membership just a simple login form),data flow is from sql server for both registeration and login,and code is currently working fine.
I am trying to use signin/signout functionality in my code. I have already created a login form and the user is able to login and after successful login, user is redirected to default_page.aspx.
my r&amp;d code upto this is as:</p>

<pre><code>&lt;td width="122" align="right"&gt;&lt;asp:LinkButton ID="LinkButton1" runat="server" 
            onclick="LinkButton1_Click"&gt;Sign Out&lt;/asp:LinkButton&gt;&lt;/td&gt;
</code></pre>

<p>cs page:</p>

<pre><code>protected void LinkButton1_Click(object sender, EventArgs e)
{
    //After click Log out we need to delete all session values


    Session.RemoveAll();
    Response.Redirect("userlogin.aspx");
}
</code></pre>

<p>from above code u can see I have put only a linkbutton and if user click on above link button user got sign out and redirected to loginpage(here userlogin.aspx). But now if I am trying to change(see below aspx and .cs) as signin|signout i am getting error as:<strong>'System.Security.Principal.IPrincipal' does not contain a definition for 'IsAuthenticated' and no extension method 'IsAuthenticated' accepting a first argument of type 'System.Security.Principal.IPrincipal' could be found (are you missing a using directive or an assembly reference?)</strong></p>

<p>aspx page:</p>

<pre><code>&lt;td width="122" align="right"&gt;&lt;asp:LinkButton ID="LinkButtonSignInOut" runat="server" 
            onclick="LinkButton1_Click"&gt;""&lt;/asp:LinkButton&gt;&lt;/td&gt;
</code></pre>

<p>.cs page:</p>

<pre><code>protected void LinkButton1_Click(object sender, EventArgs e)
{
    //After click Log out we need to delete all session values
    if (User.IsAuthenticated)**//error is here**
        LinkButtonSignInOut.Text = "Sign Out";
    else
        LabelSignInOut.Text = "Sign In"; 

    Session.RemoveAll();
    Response.Redirect("userlogin.aspx");
}
</code></pre>

<p>Any suggestions???</p>

<p>thanks!</p>
