Add select option in DataText Field in dropdownlist

16 views Asked by At

DataTable dtt = new DataTable(); adp = new SqlDataAdapter("Select ContractId,ContractNo From Contract Join Customer on Contract.Customer=Customer.CustomerId where Customer.EmailId='"+dropcustomer.SelectedValue+"' ", con); adp.Fill(dtt); dropContract.DataSource = dtt; dropContract.DataTextField = "ContractNo"; dropContract.DataValueField = "ContractId"; dropContract.DataBind(); dtt.Dispose(); adp.Dispose(); dropproduct.Items.Clear();

I Tried to show the -- Select--- Option in the DropDown list named dropContract but it is not Displaying

0

There are 0 answers