Quote:This is happening only when DataValueField is same. how to resolve this.
That's a normal behavior of the DropDownList.
As others have mentioned, the
DropDownList must be unique
so that the selection won't messed up. To fix that, use the
field as the
. For example:
ddlCurrency.DataSource = dtCurrency;
ddlCurrency.DataTextField = "shortcode";
ddlCurrency.DataValueField = "shortcode";
Now if you really want to display the
field in the page then you can combine both fields and display it as one. That really depends on you. Again, the basic idea here is to make that your
values must be unique and doesn't have duplicate values.