info是一个label,运行是提示未将对象引用设置到对象的实例,我把info换成另外的一个label时确没有错误,那位好心人能不能告诉我这是怎么回事,谢谢了。
protected System.Web.UI.WebControls.Label info;
protected System.Web.UI.WebControls.Label change;
public void manaenter(object sender,System.EventArgs e)
{
if (manager.Text==ConfigurationSettings.AppSettings["managername"]&&pas.Text==ConfigurationSettings.AppSettings["password"])
{
Session["ifenter"] = "hasenter";
info.Text = "欢迎管理员登陆!";
}
else
{
info.Text = "请确认输入!";
}
}