Hi I have problem with store user name in Session. On log on page I store user name to session. User input credentials on logon page and then is redirect on default page. I need in class Default access to variable store in session.

**Logon.aspx**

```
<script runat="server">
    void Login_Click(object sender, EventArgs e)
    {
                 Session["user"]  = tbUserName.Text;

                //You can redirect now.
                Response.Redirect(FormsAuthentication.GetRedirectUrl(tbUserName.Text, 
false));
}
</script>

```

secod main page is here:

**Default.aspx-Default.aspx.cs**

```
public partial class Default : Page, 
    IHttpHandler, System.Web.SessionState.IRequiresSessionState 
{
      string userName = (string) (Session["user"]);
}

```

but result is that userName is empty.

Web config is here:

```
<sessionState cookieless="true" regenerateExpiredSessionId="true" />

```

Thank you for advice.