一个判断语句
请问各位大侠这个判断写错了吗?不论De_name是否为空他为什么一直显示的是下拉列表呢?De_name 文本 存人名
sub showDe_name()
set rs=server.createobject("ADODB.Recordset")
sql="select * from [BJ_Business] "
rs.open sql,conn,1,1
if De_name="" then
response.Write "<form name=""form1"" method=""post"" action="""">"
response.write "<label>"
set rs_C=server.createobject("ADODB.Recordset")
sql2="select * from [CRS] where SmallClassID=2"
rs_C.open sql2,conn,1,1
response.Write "<select name=""Cid"" id=""Cid"">"
do while not rs_C.eof
response.Write "<option value=""&rs_C(Cid)&"">"&rs_C("Cname")&"</option>"
rs_C.movenext
loop
rs_C.close
'set rs_C=nothing
response.Write "</select>"
response.Write "</label>"
response.write "<label>"
response.Write "<input type=""submit"" name=""button"" id=""button"" value=""确认"">"
response.write "</label>"
response.write "</form>"
else
response.Write rs("De_name")
rs.close
set rs=nothing
end if
end sub
set rs=server.createobject("ADODB.Recordset")
sql="select * from [BJ_Business] "
rs.open sql,conn,1,1
if De_name="" then
response.Write "<form name=""form1"" method=""post"" action="""">"
response.write "<label>"
set rs_C=server.createobject("ADODB.Recordset")
sql2="select * from [CRS] where SmallClassID=2"
rs_C.open sql2,conn,1,1
response.Write "<select name=""Cid"" id=""Cid"">"
do while not rs_C.eof
response.Write "<option value=""&rs_C(Cid)&"">"&rs_C("Cname")&"</option>"
rs_C.movenext
loop
rs_C.close
'set rs_C=nothing
response.Write "</select>"
response.Write "</label>"
response.write "<label>"
response.Write "<input type=""submit"" name=""button"" id=""button"" value=""确认"">"
response.write "</label>"
response.write "</form>"
else
response.Write rs("De_name")
rs.close
set rs=nothing
end if
end sub