access Login name and login status from login control

Discussion in 'ASP Forum' started by CoolBlue, Apr 10, 2013.

  1. CoolBlue

    CoolBlue New Member

    Hell everyone....I am new to am really trying my best to achieves foll..I have created a login control in Authentication i am writing function which authenticates the user gets the user name in session and redirect to another page.I am writing this function manually because i require username for future purpose\[code\]protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { Login Login1 = ((Login)LoginView1.FindControl("Login1")); string userName = Login1.UserName.ToString(); Session["uname"] = userName; Response.Redirect("~/Project/Process/Process.aspx"); }\[/code\]Now what i want is when i redirect user to Process.aspx...1)I want to display the Username from login control and status....if user is loggedin....then display contents of page and Logout link to logout the user....2)if user is not authenticated redirect him to login page...Please help me....any help would be really appreciated

Share This Page