Retrive the items in list box

Discussion in 'ASP General' started by Amit Shinde, May 20, 2004.

  1. Amit Shinde

    Amit Shinde Guest

    I have multiple list box added to the asp page using <select> tag

    I have added items in the list box using recrdset from Education table
    Education table={educationid, educationname}

    User can choose more than items from the list box. These items gets
    added in the user table in field
    "edu" seprated by commas.
    When User wants to edit his information ...i want that the items in the
    list box should be automatically selected which are present in "edu"
    field.
    Please help
    Amit shinde

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Amit Shinde, May 20, 2004
    #1
    1. Advertising

  2. Amit Shinde

    Dominique Guest

    dim strEdu
    strEdu = field_value_in_db 'get it from ur recordset

    function select_field(eID)
    if instr(1, strEdu, eID) then
    select_field = " selected"
    end if
    end function

    call the function above when ur looping through the recordset to create the
    list again...

    do until rs.eof %>
    <option value="<%=rs("educationid")%>"
    <%=select_field(rs("educationid"))%>><%=rs("educationname")%></option>
    <%
    rs.movenext
    loop

    "Amit Shinde" <> wrote in message
    news:...
    >
    >
    > I have multiple list box added to the asp page using <select> tag
    >
    > I have added items in the list box using recrdset from Education table
    > Education table={educationid, educationname}
    >
    > User can choose more than items from the list box. These items gets
    > added in the user table in field
    > "edu" seprated by commas.
    > When User wants to edit his information ...i want that the items in the
    > list box should be automatically selected which are present in "edu"
    > field.
    > Please help
    > Amit shinde
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Dominique, May 20, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. weiwei
    Replies:
    0
    Views:
    1,009
    weiwei
    Jan 5, 2007
  2. Anjan Bhowmik
    Replies:
    1
    Views:
    468
    Misbah Arefin
    Feb 14, 2008
  3. Amit D.Shinde

    Retrive the values in the list Box

    Amit D.Shinde, May 20, 2004, in forum: ASP General
    Replies:
    0
    Views:
    124
    Amit D.Shinde
    May 20, 2004
  4. Vikas Gholap
    Replies:
    10
    Views:
    790
    Bertram Scharpf
    Feb 13, 2009
  5. Ak Newfish
    Replies:
    4
    Views:
    246
    Ak Newfish
    Mar 24, 2009
Loading...

Share This Page