SqlCommand com = new SqlCommand("select count(*) from loginInfo where Name= @name and Pass=@ps", con);
                com.Parameters.Add(new SqlParameter("@name", SqlDbType.VarChar, 50));
                com.Parameters["@name"].Value = TextName.Text;
                com.Parameters.Add(new SqlParameter("@ps", SqlDbType.VarChar, 50));
                com.Parameters["@ps"].Value = FormsAuthentication.HashPasswordForStoringInConfigFile(TextPass.Text, "MD5");

 SqlParameter表示SqlCommand的参数

 

    }

 

 

相关文章:

  • 2021-12-29
  • 2021-05-24
  • 2022-12-23
  • 2022-03-06
  • 2022-12-23
  • 2021-10-05
猜你喜欢
  • 2021-12-30
  • 2021-10-26
  • 2022-12-23
相关资源
相似解决方案