Hi,
I want to display a text, getting from database, into a DropdownList using text property.
My Code::
SqlDataReader drd;
if (drd.Read())
{
drpcompname.Text = drd.GetValue(0).ToString();
}
But It Display an error::
'drpcompname' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value
Please help me.
Thanks!
Pankaj Singh