protected void Login_Authenticate(object sender, AuthenticateEventArgs e) { DS1.SelectCommand = "SELECT * FROM [User] WHERE username = '******' AND password = '******'"; if (DS1.Select(DataSourceSelectArguments.Empty).GetEnumerator().MoveNext()) { System.Web.Security.FormsAuthentication.RedirectFromLoginPage(Login.UserName, false); } else { Login.FailureText = "Invalid Login,check your input!"; } }
protected void Login_Authenticate(object sender, AuthenticateEventArgs e) { DS1.SelectCommand = "SELECT * FROM REGISTER WHERE Username = '******' AND Password = '******'"; //DS1.Select(DataSourceSelectArguments.Empty); if (DS1.Select(DataSourceSelectArguments.Empty).GetEnumerator().MoveNext()) { System.Web.Security.FormsAuthentication.RedirectFromLoginPage(login_1.UserName, false); } else { login_1.FailureText = "Invalid Login"; } }
protected void LoginX_Authenticate(object sender, AuthenticateEventArgs e) { DS1.SelectCommand = "SELECT * FROM [user] WHERE [user_name] = '" + LoginX.UserName + "' AND [password] = '" + LoginX.Password + "'"; DS1.Select(DataSourceSelectArguments.Empty); }