if(password.Text!=userset.Tables["users"].password)
{
message.Text="密码输入错误,请重新输入";
return;
}
这个句子是不是错了
它老是报错说C:\Inetpub\wwwroot\BookShop\xiaoshou\WebForm1.aspx.cs(68): “System.Data.DataTable”并不包含对“password”的定义

解决方案 »

  1.   

    如果你的字段是password,这样:
    userset.Tables["users"].Rows[0]["password"].ToString()
      

  2.   

    多谢
    那这个是问题呢C:\Inetpub\wwwroot\BookShop\xiaoshou\WebForm1.aspx.cs(68): 无法将类型“string”隐式转换为“bool”
      

  3.   

    C:\Inetpub\wwwroot\BookShop\xiaoshou\WebForm1.aspx.cs(68): 
    你把第68行拿出来看看啊!
      

  4.   

    userset.Tables["users"].password.ToString()
      

  5.   

    这就是68行userset.Tables["users"].Rows[0]["password"].ToString()
      

  6.   

    userset.Tables["users"].password.ToString()
    C:\Inetpub\wwwroot\BookShop\xiaoshou\WebForm1.aspx.cs(68): “System.Data.DataTable”并不包含对“password”的定义
    这是为什么
      

  7.   

    说明你的DataTable:userset.Tables["users"]里没password这列。
    你看你怎么得到userset的,就知道为什么没有password列了
      

  8.   

    userset.Tables["users"].password.ToString()这句语法就是错的