MONTAR OPCOES NO COMPONENTE LIST/MENU

USUARIO.EXCLUIDOS 05/08/2007 16:26:07
#229554
Pessoal, estou com uma dúvida que não consigo encontrar como fazer, estou montando no componente List/Menu, opções para serem selecionadas de uma base de dados. Mas antes vou deixar uma opção "Selecione uma opção"

Segue o exemplo

<select name="topico" class=css_caixa id="topico" style="width:100%">
<option selected>Selecione uma opção</option>
<%If rsTop.Eof <> True and rsTop.Bof <> true then
do while not rsTop.Eof %>
<option selected><%=rsTop("descricao_top")%></option><%
rsTop.MoveNext
Loop
End If %>
</select>

Minha dúvida é o seguinte, ao terminar essa rotina, a opção que fica no ListBox é o ultimo registro da base dados, eu queria colocar a 1a opção da ListBox, a "Selecione uma opção"

Abraço a todos
USUARIO.EXCLUIDOS 10/08/2007 20:42:10
#230446
Não é melhor ultilizar o obout_ASPTreeView_2_NET.Tree() ?
MORDOR 11/08/2007 09:08:29
#230469
Tire o atributo "selected" dentro do laço.

<select name="topico" class=css_caixa id="topico" style="width:100%">
<option selected>Selecione uma opção</option>
<%If rsTop.Eof <> True and rsTop.Bof <> true then
do while not rsTop.Eof %>
<option [txt-color=#ff0000]selected[/txt-color]><%=rsTop("descricao_top")%></option><%
rsTop.MoveNext
Loop
End If %>
</select>

<select name="topico" class=css_caixa id="topico" style="width:100%">
<option selected>Selecione uma opção</option>
<%If rsTop.Eof <> True and rsTop.Bof <> true then
do while not rsTop.Eof %>
[txt-color=#006600]<option><%=rsTop("descricao_top")%></option>[/txt-color]<%
rsTop.MoveNext
Loop
End If %>
</select>
Tópico encerrado , respostas não são mais permitidas