How do collect all data in combo box?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shivasusan
    New Member
    • Oct 2008
    • 67

    How do collect all data in combo box?

    Hi!

    Pls help me.
    My backend is MS-Access.
    This is my coding........

    <%pathdefiner = "../"%>
    <!--#include file="../Connection/connector.asp" -->

    <html>

    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR " content="Micros oft FrontPage 4.0">
    <meta name="ProgId" content="FrontP age.Editor.Docu ment">
    <title>Vote for your favorite song</title>
    </head>

    <body>

    <h2><u><font color="#0000FF" face="Monotype Corsiva" size="6">Vote for your favorite song</font></u></h2>

    <p>&nbsp;</p>
    <form method="POST" action="--WEBBOT-SELF--">
    <!--webbot bot="SaveResult s"
    U-File="C:\Inetpu b\wwwroot\AspDe mo\home\_privat e\form_results. txt"
    S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
    <p>&nbsp;&nbsp; <font size="4">Songs</font>&nbsp;&nbs p;&nbsp;
    <%
    Set rs = Server.CreateOb ject("ADODB.Rec ordset")
    Set rs.ActiveConnec tion = my_Conn

    retrieveSql = "Select top 10 tbl_Vote_info.I tem_code, tbl_Item_Master .Title from tbl_Vote_info, tbl_Item_Master where tbl_Vote_info.I tem_code = tbl_Item_Master .Item_code order by Number_votes desc;"

    rs.Source = retrieveSql
    rs.Open
    %>

    <select size="1" name="D1">
    <%
    dim i
    for i=1 to 10
    Do While not rs.EOF

    if(Strcomp(yCou nt,i)<>0) then %>
    <option value="<%=i%>" selected><%=i%> </option>
    <%else%>
    <option value="<%=i%>" ><%=i%></option>
    <%End if%>

    </select>
    <%
    rs.MoveNext

    Loop
    Next
    rs.Close
    my_Conn.Close
    set rs=nothing
    set my_Conn=nothing
    %>
    &nbsp;&nbsp; </p>
    <p align="center"> <input type="submit" value="Vote" name="B1"></p>
    </form>

    </body>

    </html>
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    PLEASE post code in code tags. Please explain what you want to do and what you need help doing. Your post as is is very vague.

    Jared

    Comment

    Working...