Hi All,
I have a bit of a problem with which I have been "spinning my wheels" for a while, and any help or suggestion will be greatly appreciated.
I have an ASP.NET [New Member] form, where I capture club members and on that form there are ASP.NET dropdown lists for Gender and Region.
The table that fills the [Region] has 2 columns : ID, region... The member record saves the regionID as an Integer.
Another page lists in a gridview the individuals [memberID],[names], [Gender], [Region] (which is binding to the region table by ID) ... The gridview has links on the side to [Edit Member] or [Delete Member]...
When the [Edit Member] link is clicked, I get the [memberID] from the GridView row and I need to retrieve all its data from the [Member] table to pre-populate the form for editing.
As long as the data from the Datareader is (string) directly from the [member] table it is working fine, but I need to get the [regionID] to then retrieve the "text" value of the region to display in the [Region] dropdown list as the selected value that was originally saved for this member.
That's where my problem lies, I can't figure out how to set the DrpDwnList.DataValue with the ID saved in the member record, and get it to display the "text" associated to that ID from the [Region] table.....
Thank you for your time and help with this, and the very best to you over this festive season.
Boris.