在ASP.NET应用程序中将数据从Excel工作表上传到网站时出现错误
System.ArgumentNullException: Value cannot be null.
来源错误:
Line 161: LHSupdate.Name = AssociateName;
Line 162:
Line 163: var designation = dsData.Tables["LHS"].AsEnumerable().Where(r => Convert.ToString(r["Associate Id"]).Trim() == LHSupdate.AssciateID.Trim());
Line 164:
Line 165: if (designation != null)
源文件:D:\ GENIUS \ LHS \ LHS \ UpdateLHS.aspx.cs行:163
堆栈追踪:
[ArgumentNullException: Value cannot be null.
Parameter name: source]
System.Data.DataTableExtensions.AsEnumerable(DataTable source) +34903
LHS.Login.btnfileUplode_Click(Object sender, EventArgs e) in D:\GENIUS\LHS\LHS\UpdateLHS.aspx.cs:163
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
我应该怎样做才能成功运行。 请进一步咨询