难道没人会处理图片???

taylermail 2004-12-21 10:31:17
下面这个网页可以正常显示dwf文件(利用Autodesk Express Viewer工具)

cad_view.asp

<%
if Request.QueryString ("pipe_num")<>"" then
pipe_num=Request.QueryString ("pipe_num")
else
pipe_num=543

end if
%>
<html>

<body>

<tr height="90%">
<td colspan="10" align="center">
<object id = "viewer"
classid="clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF"
codebase="http://www.autodesk.com/global/expressviewer/installer/ExpressViewerSetup.cab" width="100%" height="100%" >
<param name = "Src" value="images/<%=pipe_num%>.dwf">
</td>
</tr>
<br>

</body>

</html>

改进版?还是不行? <%
dim s,dwf,num
if Request.QueryString ( "pipe_num ") < > " " then
num=Request.QueryString ( "pipe_num ")
else
num=543

end if
set connGraph=server.CreateObject( "ADODB.connection ")
conngraph.ConnectionString =session( "connection_string ")
conngraph.Open
set rec=server.createobject( "ADODB.recordset ")
strsql= "select * from pipe_map where pipe_num=' "&num& "' "
rec.open strsql,connGraph,1,1
if rec.RecordCount=0 then
if len(Request.QueryString( "pipe_num ")) <=4 then
rec.Close
rec.Open "select * from pipe_map where pipe_num='暂无管段图' ",connGraph,1,1
else
rec.Close
rec.Open "select * from pipe_map where pipe_num='暂无单卡图' ",connGraph,1,1
end if
end if

'Response.ContentType = "image/dwf "
dwf=rec( "pipe_map ").GetChunk(750000)
'Response.Write dwf
'Response.Write
set rec=nothing
set connGraph=nothing
% > >
<html >

<body >
<br >
<tr height= "90% " >
<td colspan= "10 " align= "center " >
<object id = "viewer "
classid= "clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF "
codebase= "http://www.autodesk.com/global/expressviewer/installer/ExpressViewerSetup.cab " width= "100% " height= "100% " >
<param name = "Src " value= "<%=dwf%> " >
</td >
</tr >
<br >

</body >

</html >
...全文
120 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Coyozo 2004-12-21
  • 打赏
  • 举报
回复
头太晕
Coyozo 2004-12-21
  • 打赏
  • 举报
回复
沙发
taylermail 2004-12-21
  • 打赏
  • 举报
回复
up
taylermail 2004-12-21
  • 打赏
  • 举报
回复
up,没有人会啊 ?呼唤高手

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧