Forums

This topic is locked

Databound dropdown question

Posted 15 Mar 2003 07:15:00
1
has voted
15 Mar 2003 07:15:00 Jon Byron posted:
If I add the word ALL to my list of countries in a databound drop down.
How do I get this to appear at the top of the list and then retrieve all the values in the DB?
Thanks.

Replies

Replied 15 Mar 2003 07:21:37
15 Mar 2003 07:21:37 Jon Byron replied:
Sorry I should have said that I am using asp.net (VB)
as this is different from thr previous post.

The drop down code is

<asp:dropdownlist AutoPostBack="true" DataValueField="Country" DataSource="<%# countries.DefaultView.Table %>" DataTextField="Country" ID="ScCountry" runat="server">


But how do I add "al" and get it to return all values.

Thanks again
Replied 18 Mar 2003 19:28:42
18 Mar 2003 19:28:42 Rafi Mellado replied:
Just create a static option "All Countries" with a value of %
that should do it.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Sorry I should have said that I am using asp.net (VB)
as this is different from thr previous post.

The drop down code is

&lt;asp:dropdownlist AutoPostBack="true" DataValueField="Country" DataSource="&lt;%# countries.DefaultView.Table %&gt;" DataTextField="Country" ID="ScCountry" runat="server"&gt;


But how do I add "al" and get it to return all values.

Thanks again
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

"If it weren't for the last minute, nothing would get done."

Reply to this topic