public void GetEditdata() { DataSet ds; DataTable dt; CustomProfile profile = CustomProfile.GetProfile(); iProductMasterClient productClient = new iProductMasterClient(); try { ds = productClient.GetEditmpackUOmdetail(UomPackId, profile.DBConnection._constr); dt = ds.Tables[0]; if (dt.Rows.Count > 0) { long Id = long.Parse(dt.Rows[0]["ID"].ToString()); GetUOMList(); if (ddluom1.Items.Count >= 1) { ddluom1.SelectedIndex = 0; } ddluom1.SelectedIndex = ddluom1.Items.IndexOf(ddluom1.Items.FindByValue(dt.Rows[0]["ID"].ToString())); ddluom1.SelectedItem.Value = Id.ToString(); ddluom1.SelectedItem.Text = dt.Rows[0]["Description"].ToString(); //ddluom1.SelectedItem.Value = dt.Rows[0]["ID"].ToString(); //ddluom1.SelectedItem.Text = dt.Rows[0]["Description"].ToString(); txtQuantity.Text = dt.Rows[0]["Quantity"].ToString(); txtsequence.Text = dt.Rows[0]["Sequence"].ToString(); } } catch {} finally{} }