Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Populating a Drop Down using ASP?
Message
From
03/03/1999 19:23:26
 
 
To
03/03/1999 17:26:06
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00193804
Message ID:
00193859
Views:
12
>I need to populate a drop down combo box using
>either Oracle or VFP data. The whole ADO and ASP
>technology is new to me.

Here's one that uses Session variables instead of ADO (it previously put the people's names in session variables because every page had it). Also a suggestion, use session arrays instead session variables (as this snippet does).
<select name="drp_Crew_Member" size="1" width="200">
  <%IF mode_type="EDIT" THEN
    RESPONSE.WRITE optnValue_NR_thru_ID(drp_Crew_Member, drp_Crew_Member_LName, drp_Crew_Member_FName, drp_Crew_Member_ID)
    ELSE%>
      <OPTION VALUE=" ">&nbsp;</OPTION VALUE>
    <%END IF%>
    <%
      ' ----------------------------------------
      ' Retrieve CrewMember Data
      ' ----------------------------------------
      intLoop=0
      cntmax=SESSION("CrewData_Count")
      FOR intLoop=1 TO cntmax
        RESPONSE.WRITE "<OPTION VALUE=" & SESSION("PesNr" & intLoop) & ">"
        RESPONSE.WRITE    SESSION("LNames" & intLoop) & ", "
        RESPONSE.WRITE    SESSION("FNames" & intLoop) & "- "
        RESPONSE.WRITE    SESSION("IDs"    & intLoop)
        RESPONSE.WRITE "</OPTION VALUE>"
      NEXT
    %>
</select> 
Previous
Reply
Map
View

Click here to load this message in the networking platform