未将对象引用设置到对象的实例。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。源错误:
行 72: int intCount=0;
行 73:
行 74: string strCount = "select * from [class],[student],[speciality] where class.specialityid=speciality.specialityid and class.monitorid=student.studentid and class.specialityname='" + DropDownList1.SelectedItem.Text + "'";
行 75: sms_conn.Open();
行 76: SqlCommand MyComm = new SqlCommand(strCount, sms_conn);
源文件: [del]H:\asp.net练习\用于小组系统的模块设计\用于小组系统的模块设计\class.aspx.cs [/del]行: 74
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。源错误:
行 72: int intCount=0;
行 73:
行 74: string strCount = "select * from [class],[student],[speciality] where class.specialityid=speciality.specialityid and class.monitorid=student.studentid and class.specialityname='" + DropDownList1.SelectedItem.Text + "'";
行 75: sms_conn.Open();
行 76: SqlCommand MyComm = new SqlCommand(strCount, sms_conn);
源文件:
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货