Combo box

Last Reply on Jun 20, 2012 08:42 AM By lucky1527

Posted on Jun 16, 2012 07:50 AM

I had a textbox which i have made it to dropdownList

before its code was

                    Qry += "'"+ cid +"', '" + cmbGroups.SelectedValue.ToString() + "', " + cmbWard.SelectedValue.ToString() + ", '" + txtFirstName.Text + "', '" + txtMiddleName.Text + "', '" + txtLastName.Text + "', ";

                    Qry += "  " + txtFileNo.Text + ",'" + txtPan.Text + "','" + lblGenderMF.Text + "'," + txtCliStatus.SelectedValue.ToString() + ",'" + cmbPrintAdd.Text + "', " + cmbArea.SelectedValue.ToString() + "," + txtRevenue.SelectedValue.ToString() + ",'" + txtAudit.Text + "','" + txtAccMethod.Text + "',";

 

which i had made to below one

 

                    Qry += "'"+ cid +"', '" + cmbGroups.SelectedValue.ToString() + "', " + cmbWard.SelectedValue.ToString() + ", '" + txtFirstName.Text + "', '" + txtMiddleName.Text + "', '" + txtLastName.Text + "', ";

                    Qry += "  " + txtFileNo.Text + ",'" + txtPan.Text + "','" + lblGenderMF.Text + "'," + txtCliStatus.SelectedValue.ToString() + ",'" + cmbPrintAdd.Text + "', " + cmbArea.SelectedValue.ToString() + "," + txtRevenue.SelectedValue.ToString() + ",'" + txtAudit.Text + "','" + txtAccMethod.SelectedValue.ToString() + "',";

 

the highlighted one are the changes its giving error object reference not set

I have put values in drop down p1,p2,p3,p4

its selecting values through above query

and giving error to below one  can u clarify what should i do.

 

 

 

This question does not have replies that have been liked.