public Int64 GetMaxID()
{
DataTable tblMaxID = new DataTable();
tblMaxID = SysUtil.Fill("p_getmaxid"); Int64 maxID = 0;
if (tblMaxID.Rows.Count > 0)
{
maxID = SysConvert.ToInt64(tblMaxID.Rows[0]["MaxID"].ToString()); //报错位置 maxID,这行注释了就没问题
}
tblMaxID.Dispose(); return maxID;
}编译时报错:
错误 1 类型“System.Web.UI.WebControls.TextBox”在未被引用的程序集中定义。必须添加对程序集“System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”的引用。 E:\Constructor\SourceCode\DingSi.Constructor.Business\Query\HSE\HSE_bmb_Query.cs 58 17 DingSi.Constructor.Business
错误 2 类型“System.Web.UI.WebControls.DropDownList”在未被引用的程序集中定义。必须添加对程序集“System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”的引用。 E:\Constructor\SourceCode\DingSi.Constructor.Business\Query\HSE\HSE_bmb_Query.cs 58 17 DingSi.Constructor.Business
引用: using System.Web.UI.WebControls;
所有的控件都是微软封装过的,这样才会有它的属性等等只有你引用了它的DLL,才能在你的UI上去使用。
和平时做项目需要一些类库的DLL,一个道理。