If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Gettting records inside select box

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-23-04, 00:45
sureshkbk sureshkbk is offline
Registered User
 
Join Date: Jan 2004
Location: Madurai, Tamilnadu, India
Posts: 9
Gettting records inside select box

I need to load a field retrieved from a database into a select box. How can i do it. I need the code.
Reply With Quote
  #2 (permalink)  
Old 01-23-04, 07:09
rhs98 rhs98 is offline
Super Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 441
You mean you need to populate a select box with values from a database?
Reply With Quote
  #3 (permalink)  
Old 01-23-04, 10:01
sureshkbk sureshkbk is offline
Registered User
 
Join Date: Jan 2004
Location: Madurai, Tamilnadu, India
Posts: 9
Yes, I need to populate the select with the content of a database
Reply With Quote
  #4 (permalink)  
Old 01-23-04, 10:19
rhs98 rhs98 is offline
Super Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 441
Code:
'open rs
%>
<select name="selecty thing">
<%
while not rs.eof
%>
<option value="<%=rs.fields("id")%>"><%=rs.fields("text")%></option>
<%
rs.movenext
wend
%>
</select>
<%
'close rs
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On