HighTechTalks DotNet Forums  

List of countries in a DropDownBox

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss List of countries in a DropDownBox in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
slinky
 
Posts: n/a

Default List of countries in a DropDownBox - 05-14-2007 , 08:15 AM






Thanks all in advance! I use Visual Web Studio (Visual Basic.net) for
my web site. How can I use the following HTML list of countries within
my Visual Basic.net code to fill a DropDownBox I'm placing on my .aspx
page?

<select name="countryid" size="1" id="countryid" class="field_textbox"
size="50">
<option value="0">Select your country</option>

<option value="1">Afghanistan</option>
<option value="2">Albania</option>
<option value="3">Algeria</option>
<option value="4">American Samoa</option>
//delete section to save psting space
<option value="210">United States</option>
<option value="228">United States Minor Outlying Islands</option>
<option value="211">Uruguay</option>
<option value="212">Uzbekistan</option>
<option value="213">Vanuatu</option>
<option value="214">Venezuela</option>
<option value="215">Vietnam</option>
<option value="216">Virgin Islands</option>
<option value="218">Wallis and Futuna</option>
<option value="219">Western Sahara</option>
<option value="220">Yemen</option>
<option value="221">Yugoslavia</option>
<option value="50">Zaire</option>
<option value="222">Zambia</option>
<option value="223">Zimbabwe</option>

</select>


Reply With Quote
  #2  
Old   
pvdg42
 
Posts: n/a

Default Re: List of countries in a DropDownBox - 05-14-2007 , 08:28 AM







"slinky" <campbellbrian2001 (AT) yahoo (DOT) com> wrote

Quote:
Thanks all in advance! I use Visual Web Studio (Visual Basic.net) for
my web site. How can I use the following HTML list of countries within
my Visual Basic.net code to fill a DropDownBox I'm placing on my .aspx
page?

select name="countryid" size="1" id="countryid" class="field_textbox"
size="50"
option value="0">Select your country</option

option value="1">Afghanistan</option
option value="2">Albania</option
option value="3">Algeria</option
option value="4">American Samoa</option
//delete section to save psting space
option value="210">United States</option
option value="228">United States Minor Outlying Islands</option
option value="211">Uruguay</option
option value="212">Uzbekistan</option
option value="213">Vanuatu</option
option value="214">Venezuela</option
option value="215">Vietnam</option
option value="216">Virgin Islands</option
option value="218">Wallis and Futuna</option
option value="219">Western Sahara</option
option value="220">Yemen</option
option value="221">Yugoslavia</option
option value="50">Zaire</option
option value="222">Zambia</option
option value="223">Zimbabwe</option

/select

Does the list change frequently? I suspect not. Why not populate at design
time or create a simple text file from which to populate your list?




Reply With Quote
  #3  
Old   
slinky
 
Posts: n/a

Default Re: List of countries in a DropDownBox - 05-14-2007 , 08:53 AM



This list would rarely change. I'm a newbie and happened upon this
html by looking at an existing website. So I thought - neat. Tell me
more about how to populate at design time. Also I tried a table in my
SQL database and dragged it over to my aspx in design view then was at
a loss as to what to do next. I did a rebuild and the page failed so I
didn't go further. Any help would be appreciated. Thanks!
Quote:
Does the list change frequently? I suspect not. Why not populate at design
time or create a simple text file from which to populate your list?- Hide quoted text -

- Show quoted text -



Reply With Quote
  #4  
Old   
pvdg42
 
Posts: n/a

Default Re: List of countries in a DropDownBox - 05-14-2007 , 10:42 PM




"slinky" <campbellbrian2001 (AT) yahoo (DOT) com> wrote

Quote:
This list would rarely change. I'm a newbie and happened upon this
html by looking at an existing website. So I thought - neat. Tell me
more about how to populate at design time. Also I tried a table in my
SQL database and dragged it over to my aspx in design view then was at
a loss as to what to do next. I did a rebuild and the page failed so I
didn't go further. Any help would be appreciated. Thanks!

Does the list change frequently? I suspect not. Why not populate at
design
time or create a simple text file from which to populate your list?- Hide
quoted text -

- Show quoted text -


In design mode, you can access the Items collection of the list/combo box
and populate it through the Properties window.
For beginner level tutorials and information, start here:

http://msdn.microsoft.com/vstudio/express/beginner/




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.