且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

asp.net登录页面代码

更新时间:2023-12-03 14:59:22

嗨.
"pass.ExecuteScalar()"的结果可能为空值.
您不能调用null的ToString()方法.

hi.
the result of "pass.ExecuteScalar()" may be a null value.
You can''t call ToString() method of a null.

object password = pass.ExecuteScalar();
if (password != null)
{
    //here you can use password
}