I have a gridview on a page that contains a dropdownlist with a list of values from a segment table. The remaining grid data comes from a profile table. When I load existing values for the grid I want the existing value for the profile.segment to be found
and displayed in the dropdown list.
This was working fine when I was storing the string value in the in the profile.segment column. But the dba has changed it to hold the id of the segment from the segment table instead of the string value.
I'm unclear what I need to change in order for it to work again.
The segment dropdown is coded like so:
<asp:DropDownList ID="ddlSegment" SelectedValue='<%#Bind("Segment")%>' DataSource='<%# GetSegmentList() %>' Width="80px" Enabled="true" runat="server"></asp:DropDownList>
GetSegmentList returns a List<of string>
< ...
Go to the complete details ...