{
string mima = this.TextBox1.Text.Trim().ToString();
string sql = "select ID from ddymm where mima = '" + mima + "'";
int i = 0;
DataTable dt = new DataTable();
dt = mycon.myDataTable(sql);
i = dt.Rows.Count;
if (i > 0)
{
this.Panel1.Visible = !this.Panel1.Visible;
}
else
{
this.Label1.Text = "<script language='javascript'>alert('密码错误~!');</script>";
}
我运行时说我未将对象引用设置到对象的实例
i = dt.Rows.Count;这句出现的感叹号
咋个整,我做的要求是输入正确密码后才能显示PANEL1里面的内容,开始PANEL1是隐藏的