Make Sure you already bind a Dropdown control..
for (int i = 0; i < ddlCountry.Items.Count; i++)
{
if (ddlCountry.Items[i].Text.ToString() == dsCustomer.Tables[0].Rows[0]["CountryName"].ToString().Trim())
{
ddlCountry.Items.FindByText(dsCustomer.Tables[0].Rows[0]["CountryName"].ToString().Trim()).Selected = true;
}
}
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment