I have a ListBox tied to SqlDataSource.
Here is the data source:
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ SomeConnection %>"
SelectCommand="SELECT [AmenityID], [AmenityName] FROM [Amenity_Table]">
</asp:SqlDataSource>
Here is the ListBox:
<asp:ListBox ID="amenity" runat="server" DataSourceID="SqlDataSource3"
DataTextField="AmenityName" DataValueField="AmenityID" SelectionMode="Multiple"
Width="70%" Rows="7">
Now what I have is a query that returns a string of existing items that need to be selected. So a seperate data source returns a string that I split and this contains the AmenityID. I have this in my page load ...
Go to the complete details ...