0

In an ASP.NET application while uploading data from an excel sheet to website im getting the error

   System.ArgumentNullException: Value cannot be null.

Source Error:

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)

Source File: D:\GENIUS\LHS\LHS\UpdateLHS.aspx.cs Line: 163

Stack Trace:

[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

What should i do to run succesfully. Please advice further

raji
  • 65
  • 1
  • 2
  • 9

0 Answers0