Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 5th, 2007, 01:01 AM
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jason_lai
Default about DropDownList question

here is the code about DropDownList:
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource_DropDownList"
        DataTextField="user_name" DataValueField="user_id" Width ="100%">
</asp:DropDownList>

How to show more than one in the DataTextField?
thanks!

 
Old June 5th, 2007, 01:34 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Well I am afraid its not possible to bind the dropdownlist with 2 fields at the same time!!!!

Regards
Mike

Don't expect too much, too soon.
 
Old June 5th, 2007, 07:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there...

besides this not being posible to do with the dropdown itself, you can do it concatenating the fields in the sql that fills the dropdown...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old June 5th, 2007, 08:40 PM
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jason_lai
Default

O,I see ,thank you gbianchi!






Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP!!! (DropdownList in GridView question) Aaron Edwards ASP.NET 2.0 Basics 10 June 25th, 2006 05:08 AM
asp:dropdownlist question khng ASP.NET 1.0 and 1.1 Basics 3 April 1st, 2005 06:50 AM
DropDownList Question khng Classic ASP Components 3 April 1st, 2005 12:56 AM
hi, some question bout condition of Dropdownlist.. life_s Ng ASP.NET 1.0 and 1.1 Basics 3 September 26th, 2003 10:26 PM
dropdownlist question... pls help life_s Ng ASP.NET 1.0 and 1.1 Basics 2 September 26th, 2003 05:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.