Exemplo n.º 1
0
 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!";
     }
 }
Exemplo n.º 2
0
 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";
     }
 }
Exemplo n.º 3
0
 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);
 }