Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populating a Drop Down using ASP?
Message
De
03/03/1999 19:23:26
 
 
À
03/03/1999 17:26:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00193804
Message ID:
00193859
Vues:
13
>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> 
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform