Is it possible to create a Drop Down control that displays 2 database values? I would like to show both an ID Number and a name in the dropdown however they are in two columns. I tried to set the data text field to be "ID & NAME" (without the quotes) and I
received Exception Details: System.Web.HttpException: DataBinder.Eval: 'System.Data.Common.DbDataRecord' does not contain a property with the name ID & Name. Does anyone know how or if this can be done. Thanks
If you are using the dropdown only to DISPLAY the results, I used the following code to display the date and title (both separate columns) to the "Quick List" dropdown on this page (I am not familiar enough with ASP.net to know if this will work outside of
the Dreameaver MX enviroment as I am calling a dataset that is contained in DW tags. I would think the code below would work on its own but I haven't tried it): http://www.nicic.org/Resources/TopPubs.aspx The code contains a form with a
[ Select a Title ] "> '- </form> ************************* Hope this helps.
porterboy
Member
442 Points
185 Posts
Create Dropdown with 2 database values?
Nov 14, 2003 02:02 PM|LINK
SushilaSB
Star
11417 Points
2265 Posts
Re: Create Dropdown with 2 database values?
Nov 14, 2003 02:05 PM|LINK
Visual ASP/ASP.NET MVP
http://weblogs.asp.net/sushilasb
MrBalloonKno...
Member
5 Points
1 Post
Re: Create Dropdown with 2 database values?
Nov 17, 2003 03:25 AM|LINK