Questo esempio ti dovrebbe aiutare, qui viene creato un array (sel_list) nel quale
vengono salvati (con la funzione InsertItem) i valori precedenti,
se il valore è ripetuto non viene aggiunto all'array.
Accetta un massimo di 100 elementi ! Se vuoi renderlo dinamico si deve
aggiungere un Redim quando supera la dimensione massima dell'array
Ciaocodice:<% Dim sel_list(100) ' Inserimento dei valori provenienti dal db InsertItem sel_list,"Uno" InsertItem sel_list,"Due" InsertItem sel_list,"Uno" InsertItem sel_list,"Tre" InsertItem sel_list,"Due" %> <select name=lista" size="1"> <% dim k for k = 0 to ubound(sel_list) Response.Write("<option value=""" & sel_list(k) & """>" & sel_list(k) & "</option>") next %> </select> <% Sub InsertItem(lista, valore) Dim i Dim found found = False For i = 0 to UBound(lista) if IsEmpty(lista(i)) Then Exit For end if if lista(i) = valore Then found = True Exit For end If next if not found Then lista(i) = valore End If End Sub %>

Rispondi quotando