Author: Kronprinz311 | Posted on: 6/25/2009 11:32:17 AM | Views : 250



Hello all!
I have a DropDownList called "ddlCountry" that I need to populate with values from a table. Normally I would just push the recordset's "countryName" field into an array and use ddlCountry.DataBind to populate it with the array.
resulting in something like this:
<option value="Afghanistan">Afghanistan</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>


But I need to do something different this time.


I want the value property of the DDL to be populated witht he field called "CountryID" and the have the text value be the loaded to the corresponding row's "countryName" field.


so i get something like this in my output:

 Go to the complete details ...