hi frnds getting error like in my drop down list
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 1528: ncmdbObject.Dispose();
Line 1529: }
Line 1530: }
Line 1531:
Line 1532: #endregion
and my cs page this public void bindropDownDepartment()
{
try
{
objDiaryOB.RoleId = Convert.ToInt32(Session["Role_Id"]);
objDiaryOB.ModuleId = Convert.ToInt32(Request.QueryString["ModuleID"]);
p_Var.dSet = obj_miscelBL.GetDepartment(obj_userOB);
if (p_Var.dSet.Tables[0].Rows.Count > 0)
{
p_Var.sbuilder.Remove(0, p_Var.sbuilder.Length);
p_Var.dSet = null;
p_Var.dSet = obj_miscelBL.GetDepartment(userObject);
trdepartmrnt.Visible = true;
ddlDepartName.DataSource = p_Var.dSet;
ddlDepartName.DataTextField = "Deptt_Name";
ddlDepartName.DataValueField = "Deptt_Id";
ddlDepartName.DataBind();
}
p_Var.dSet = null;
}
catch
{
throw;
}
}
Ramesh PalanivelRank #372 · 6.8K reputationPosted Nov 28, 2017, 8:36 PM EST
Anjali KhanRank #1,649 · 931 reputationPosted Nov 28, 2017, 8:46 PM EST
Ramesh PalanivelRank #372 · 6.8K reputationPosted Nov 28, 2017, 8:49 PM EST
Anjali KhanRank #1,649 · 931 reputationPosted Nov 28, 2017, 9:06 PM EST
Ramesh PalanivelRank #372 · 6.8K reputationPosted Nov 28, 2017, 9:10 PM EST
Anjali KhanRank #1,649 · 931 reputationPosted Nov 28, 2017, 9:19 PM EST
Anjali KhanRank #1,649 · 931 reputationPosted Nov 28, 2017, 9:24 PM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts