Click here to Skip to main content
15,899,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting "DataTable Object Gets another Datatable object Data exception"..
Why it Causes?

C#
public void getemployee()
{
    objfeedretailPL.status = 6;
    DataTable dtemployee = new DataTable();

    dtemployee = objfeedretailBAL.GetType(objfeedretailPL);
    if (dtemployee.Rows.Count > 0)
    {
        ddlreferredby.DataSource = dtemployee;
        ddlreferredby.DataTextField = "employeename";
        ddlreferredby.DataValueField = "employeename";
        ddlreferredby.DataBind();
        ddlreferredby.Items.Add(new ListItem("--Select--", "0"));
        ddlreferredby.SelectedIndex = ddlreferredby.Items.Count - 1;
    }
}


Here dtemployee get another page DataTable Information
What Should I do...Please Suggest Me...
Posted
Updated 21-Jan-14 21:36pm
v2

1 solution

create new instance of objfeedretailPL before initialize 6 to status. may this helps you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900