public void LoadData() { SqlDataAdapter da = new SqlDataAdapter("Select Quantity from Client_StandardPostcardRequest where Edition_Id=" + Session["Edition_ID"].ToString() + " and Exhibitor_ID=" + Session["Exhibitor_ID"].ToString() + "", con); DataSet ds = new DataSet(); da.Fill(ds); if (ds.Tables[0].Rows.Count > 0) { int i = (int)ds.Tables[0].Rows[0]["Quantity"]; rblQuantity.SelectedItem.Text = i.ToString(); } }
string value = ds.Tables[0].Rows[0]["Quantity"].ToString(); ListItem targetItem = rblQuantity.Items.FindByValue(value); if (targetItem != null) targetItem.Selected = true;
value
text
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)