用like 来判断是不正确的

解决方案 »

  1.   

    你的Userid和psd1都是用textBox控件吗?
    如果是的话试试这样:
    "select Userid,Psd1,from userinfo where userid = '"+this.userid.Text+"' and
     psd1 = '"+this.psd1.Text+"'";
      

  2.   

    "select * from userinfo where userid like '%"+this.userid.Value+"%' and
     psd1 = '%"+this.psd1.Value+"%'";错.第二行.用到%就肯定要用like 不能用=
    "select count(*) from userinfo where userid = '"+this.userid.Value+"' and
     psd1 = '"+this.psd1.Value+"'";去掉%的原因:%代表多个字符.
      

  3.   

    我用的是html的控件,然后runat=“server”