HI,
I have a unicode value save in database table. I want to retrive its original value at runtime and then bind it to the dropdownlist. How to retrive the original value at runtime from unicode form and bind its value to the dropdown.
What I have tried:
SqlCommand cmd = new SqlCommand("Select PSL_RATE , PSL_CURRENCY FROM PSLRATE_MASTER where PSLROLE_ID='" + ddlPSLRoles.SelectedValue + "' and LOCATION_ID= '" + ddlLocations.SelectedValue + "'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count == 0)
{
ddlPSLRateFormat.Items.Add(new ListItem("//here I want original format value", "U+20B9"));
ddlPSLRateFormat.Items.Add(new ListItem("here I want original format value ", "U+0024"));
ddlPSLRateFormat.Items.Add(new ListItem("here I want original format value ", "U+00A3"));
ddlPSLRateFormat.Items.Add(new ListItem("here I want original format value ", "U+20AC"));
ddlPSLRateFormat.Items.Insert(0, "--Select--");
}
else
{
ddlPSLRateFormat.DataSource = dt;
//here need to convert Unicode value to original form. Unicode format value present in the datacolumn. after converting bind to the below dropdown.
ddlPSLRateFormat.DataTextField = //what should be here;
ddlPSLRateFormat.DataValueField = "PSL_CURRENCY";
ddlPSLRateFormat.DataBind();
}