62,025
社区成员
发帖
与我相关
我的任务
分享
DataTable dt = BL.Project.GetProjectInfo("2010101901");
//这一句正常,显示的是System.String
Response.Write("<script>alert('" + dt.Rows[0]["Expenses"].GetType() + "');</script>");
//这一句报Cannot implicitly convert type 'System.Type' to 'string'
this.Label1.Text = dt.Rows[0][0].GetType();
//这一句报Cannot implicitly convert type 'object' to 'string'.
this.Label2.Text = dt.Rows[0][0];
this.Label2.Text = dt.Rows[0][0].ToString();