| Author: Deepa 04 Jul 2008 | Member Level: Diamond | Rating: Points: 2 |
check this: here is sample code http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/login/login.aspx
|
| Author: SSN 04 Jul 2008 | Member Level: Gold | Rating: Points: 4 |
The login control is most probably used for the project using the authentication(form authentication) mode. In that mode there is not need to add a single line of code in login cs file. Better you have to create a login form using the controls from the tool box, I think you may got an Idea?? All the best regards
|
| Author: Jaya Kumar 04 Jul 2008 | Member Level: Gold | Rating: Points: 6 |
protected void Login_Authenticate(object sender, AuthenticateEventArgs e) { try { if (Validata_Data()) { lblError.Visible = false; //Your Store Proc Fn Comes here while (sqlRdr.Read()) { Session["UserID"] = Convert.ToString(sqlRdr["UserID"]); Session["UserTypeID"] = Convert.ToString(sqlRdr["UserTypeID"]); Session["FullName"] = Convert.ToString(sqlRdr["FullName"]); Session["UserType"] = Convert.ToString(sqlRdr["UserType"]); } switch (Convert.ToString(Session["UserType"]).ToUpper().Trim()) { case "ADMIN": RedirectPage = "AdminHome.aspx"; break; case "MEMBER": RedirectPage = "MemberHome.aspx"; break; } Response.Redirect(RedirectPage, false); } } catch (Exception ex) { lblError.Visible = false; lblError.Text = ex.Message; } } }
|