| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 520 人关注过本帖
标题:请教关于asp的form问题
只看楼主 加入收藏
cirowong
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2011-10-12
结帖率:0
收藏
已结贴  问题点数:20 回复次数:1 
请教关于asp的form问题
有a.asp页面,上部分是条件查询form,下部分是结果显示。
  现在想点击“打印”在b.asp上也显示结果。该如何写.....  请各位大侠指教。。。

A.ASP
<!--#include file="conn.asp" -->
   <% action = request("action") %>
<FORM ......>
....'//FORM内容
<%
keyword=replace(replace(replace(replace(replace(trim(request("keyword")),"'",""),"<","("),">",")"),"&gt;",")"),"&lt;","(")
typeid=replace(replace(replace(replace(replace(trim(request("typeid")),"'",""),"<","("),">",")"),"&gt;",")"),"&lt;","(")
%>     
</FORM>
<% if action="ok"  then  %>
<%set rsstudent=server.createobject("adodb.recordset")
xsxx=1
if keyword="" then
response.redirect "admin_xxcx.asp"
end if
if typeid="" then
sqlstudent="select * from student where name like '%"&keyword&"%'  order by adid desc"
end if
if typeid="1" then
sqlstudent="select * from student where name like '%"&keyword&"%'  order by adid desc"
end if
if typeid="2" then
sqlstudent="select * from student where class like '%"&keyword&"%'  order by adid desc"
end if
if typeid="3" then
sqlstudent="select * from student where h_number like '%"&keyword&"%'  order by adid desc"
end if
if typeid="4" then
sqlstudent="select * from student where hostel like '%"&keyword&"%'  order by adid desc"
end if
if typeid="5" then
sqlstudent="select * from student where sex like '%"&keyword&"%'  order by adid desc"
end if
if typeid="6" then
sqlstudent="select * from student where Native_place like '%"&keyword&"%'  order by adid desc"
end if
if typeid="7" then
sqlstudent="select * from student where nation like '%"&keyword&"%'  order by adid desc"
end if            
if typeid="8" then
sqlstudent="select * from student where status_number like '%"&keyword&"%'  order by adid desc"
end if   
if typeid="9" then
sqlstudent="select * from student where adnumber like '%"&keyword&"%'  order by adid desc"
end if   
if typeid="10" then
sqlstudent="select * from student where tele like '%"&keyword&"%'  order by adid desc"
end if   
if typeid="11" then
sqlstudent="select * from student where admin like '%"&keyword&"%'  order by adid desc"
end if
                        
rsstudent.open sqlstudent,conn,1,1%>
<%if rsstudent.eof and rsstudent.bof then%>
               
<%response.write "<SCRIPT LANGUAGE=JavaScript>alert (' 抱歉没有找到您想要的数据!');window.location.href='admin_xxcx.asp';</script>"%>
<%else%>
<%i=0%>
               
<%do while not rsstudent.eof or rsstudent.bof %>
  <%i=i+1%>

'<!--//显示结果。。。。
搜索更多相关主题的帖子: 如何 asp request keyword include 
2011-10-12 10:50
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:20 
通过URL传参数b.asp过去呢?
2011-10-12 13:10
快速回复:请教关于asp的form问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.039033 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved