asp中下拉列表读出数据库里的值并且显示为当前值

来源:百度知道 编辑:UC知道 时间:2024/06/04 11:00:05
假如我在下拉列表定义好的值为c,d,e,我从数据库里读出来d,下拉列表当前值也得是2.见到在asp.net中能实现,可是我这儿必须用asp,请问怎样实现?谢谢!

<select>
<option <% if rs("字段名") = "c" then response.write " selected " %> value="c">1</option>
<option <% if rs("字段名") = "d" then response.write " selected " %> value="d">2</option>
<option <% if rs("字段名") = "e" then response.write " selected " %> value="e">3</option>
</select>

没看明白。说明白点才好帮你。。。