Click here to Skip to main content
15,919,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i written below code in page load and all gridview events like rowdatabound,databound events
CSS
MySqlConnection mcon;
       MySqlCommand cmd;
       MySqlDataAdapter da ;

                cmd = new MySqlCommand(text, mcon);
                //cmd.CommandText = text;
                cmd.CommandType = cm;
                mcon.Open();
                da.SelectCommand = cmd;
                da.Fill(ds);
                mcon.Close();
               dropdownlist1.datasourcw=ds;//dropdownlist1 is from grid view
  dropdownlist1.datatextfield="deptname
  dropdownlist1.datavaluefield="deptno"
dropdownlist1.databind()

i am getting exception as object instance.....
how to solve that exception
Posted

1 solution

Look at this and this link.It will help you.
 
Share this answer
 
v2
Comments
Member 9714428 2-May-13 7:23am    
again i am getting same exception

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