Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.NET Problem

Status
Not open for further replies.

rohitpabby

Programmer
Aug 13, 2001
27
IN
Hi there!

I am a new learner of ASP.NET. I have a dropdownlist control which I have bound with a table and all the records are coming fine. But I want to add one more value in the list. E.g. If I have a dropwon for selection of countries. I want that "Select Country" should be the first item in the list and then the values which came from the table.

Please help....

Thanks.

Warm Regards,
Rohit Pabby
 
Before you display your countries, add a couple of extra <OPTION> to your SELECT

Code:
<SELECT NAME=&quot;country&quot;>
<OPTION VALUE=&quot;&quot;>Select a Country</OPTION>
<OPTION VALUE=&quot;&quot;></OPTION>
<%
loop through your countries here
%>
</SELECT>
Tony
reddot.gif WIDTH=300 HEIGHT=2 VSPACE=3

 
No, this is what you do in ASP and I am using ASP.NET. In this you can not write <select > but you write <asp:dropdownlist >
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top