|
我做了个下载页面,代码是:
<%@LANGUAGE="VBSCRIPT" %>
<% Session.CodePage="936" %>
<%
if session("flag")< 1 then
response.redirect "error.htm"
response.End
end if
%>
<%
Response.ContentType = "application/vnd.ms-word"
filename="CHINACOAT_SELECT"
Response.AddHeader "content-disposition", "attachment; filename=" & filename & ".doc"
Response.Charset = "GB2312"
%>
<!--#include file="conn.asp"-->
<%
dim a1,b1,c1,d,e,f,g,h,i,j,k,l,m,n,o,p
a1=request.Form("int1") '展台号
b1=request.Form("int2") '新展商
c1=request.Form("int3") 'reprenstby
d=request.Form("int4") '公司名
e=request.Form("int5") '公司名中文
f=request.Form("int6") '地址
o=request.Form("int14") '中文地址
p=request.Form("int15") '附加资料
g=request.Form("int7") '邮遍
h=request.Form("int8") '电话
i=request.Form("int9") '传真
j=request.Form("int10") '电邮
k=request.Form("int11") '网址
l=request.Form("int12") '公司简介英文
m=request.Form("int13") '公司简介中文
%>
<%
dim a,b,c
a=request.Form("user")
b=request.Form("zone")
if a="All" then
a=""
end if
c=request.Form("office")
if c="All" then
c=""
end if
dim sql
yy=""
yy1=""
if a<>"" then
yy="admin="&a
end if
if c<>"" then
yy1=" followup="&c
end if
if a<>"" then
if c<>"" then
if b="8" then
sql="select * from detail where admin='"&a&"' and zone1='3' or zone1='5' and followup='"&c&"' "
elseif b="10" then
sql="select * from detail where admin='"&a&"' and zone1='4' or zone1='6' and followup='"&c&"' "
elseif b="All" then
sql="select * from detail where admin='"&a&"' and followup='"&c&"' "
else
sql="select * from detail where admin='"&a&"' and zone1='"&b&"' and followup='"&c&"' "
end if
else
if b="8" then
sql="select * from detail where admin='"&a&"' and zone1='3' or zone1='5' "
elseif b="10" then
sql="select * from detail where admin='"&a&"' and zone1='4' or zone1='6' "
elseif b="All" then
sql="select * from detail where admin='"&a&"' "
else
sql="select * from detail where admin='"&a&"' and zone1='"&b&"' "
end if
end if
else
if c<>"" then
if b="8" then
sql="select * from detail where zone1='3' or zone1='5' and followup='"&c&"' "
elseif b="10" then
sql="select * from detail where zone1='4' or zone1='6' and followup='"&c&"' "
elseif b="All" then
sql="select * from detail where followup='"&c&"' "
else
sql="select * from detail where zone1='"&b&"' and followup='"&c&"' "
end if
else
if b="8" then
sql="select * from detail where zone1='3' or zone1='5' "
elseif b="10" then
sql="select * from detail where zone1='4' or zone1='6' "
elseif b="All" then
sql="select * from detail"
else
sql="select * from detail where zone1='"&b&"' "
end if
end if
end if
set rs=server.CreateObject("adodb.recordset")
rs.Open sql,myconn,1,1
do while not rs.eof
%>
展台号<%=rs("boothnumber")%><br>
展区<%=rs("zone1")%><br>
<%=rs("new1")%><br>
<%=rs("representby")%><br>
<%=rs("companyeng")%><br>
<%=rs("companychi")%><br>
<%=rs("address")%><br>
<%=rs("addresschi")%><br>
<%=rs("post")%><br>
<%=rs("phone")%><br>
<%=rs("fax")%><br>
<%=rs("email")%><br>
<%=rs("website")%><br>
<%=rs("attached")%><br>
<%=rs("instreng")%><br>
<%=rs("instrchi")%><br>
<%
response.Write "<br><br><br>"
rs.movenext
loop
rs.close
set rs=nothing
myconn.close
set myconn=nothing
%>
下载出来的word文档却成了这样:
展台号15
展区3Newwwwnew-expostar'dkk'fdshjh fdhsfjk新展星展览深圳有限公司shijiejinrongzhongxin 世界金融中心5103536138811361388113xiaohonghui0@163.comwww.new-expostar.com输入人: xiao 输入日期: 2007-4-17 上午 11:32:01
更新人: xiao 更新日期: 2007-4-17 下午 02:35:17
1718<br><br><br>
展台号15
展区5New24我是第二个展区为567891011121718<br><br><br>
展台号1B205
展区4gfdggfdgdg我是展区4gfdgdfgdfgdfsdfklsjdfkljsdklfjlkds;jffffffffffffffffffffffffffffjklfjeiowjfoiejwoifjeiowjf<br><br><br>
展台号6
展区644我是展区66666666666<br><br><br>
展台号6
展区344新展星xiao16666666666<br><br><br>
展台号5
展区5jklfsjklkj新展星xiao2<br><br><br>
展台号55fds
展区6新展星xiao4<br><br><br>
展台号4
展区4新展星xiao3<br><br><br>
<br>符号在里面都显示了,如果在代码里面不要<br>,它就不换行了。
请问大家这是什么问题?怎么才能解决,谢谢!! |
|