I want to add data from dropdown list to gridview ,,,
here my code
- con.Open();
- SqlDataAdapter adpr1 = new SqlDataAdapter("select * from ItemMasterFile ", con);
- DataSet dspr1 = new DataSet();
- adpr1.Fill(dspr1);
- DropDownList1.DataSource = dspr1.Tables[0];
- DropDownList1.DataTextField = "Descriptionitem";
- DropDownList1.DataValueField = "Codeitem";
- DropDownList1.DataBind();
i want to insert Datatextfield and Datavalue into gridview...