《ASP产品展示界面网页代码.doc》由会员分享,可在线阅读,更多相关《ASP产品展示界面网页代码.doc(9页珍藏版)》请在金锄头文库上搜索。
1、ASP网页设计代码之产品展示界面1.创建一个pro1.asp12.创建产品详细展示界面proshow.asp43.创建连接数据库的文件conn.asp74.创建数据库Data.Mdb8亲爱的读友们,下面的代码是我平常工作时会做到的代码,所谓好东西大家一起分享,希望你们看了能够顺利的做出来哦最初一定要新建一个文件夹,无论放在哪里都可以,路径是虚拟路径。但是一定要吧下面几个创建的文件放在同一个文件夹里面。1.创建一个pro1.asp添加以下代码,这里我已经简化成最简化了。所以基本不用再继续删减了。无标题文档 % Bigclassname=Request(Bigclassname) Smallcla
2、ssname=Request(Smallclassname)set rs=server.createobject(adodb.recordset)if Request(Bigclassname)= thensql=select top 700 * from product order by product_IDend ifif Request(Bigclassname) and request(smallclassanme)=thensql=select * from product where bigclassname=&Bigclassname& order by product_ID e
3、nd ifif Request(Bigclassname) and request(smallclassname) thensql=select * from product where bigclassname=&Bigclassname& and Smallclassname =&smallclassname&order by product_ID descend ifrs.open sql,conn,1,1if rs.eof or rs.bof thenresponse.write 暂时没有产品记录!end ifif request(page)= thenpage=1elsepage=c
4、int(request(page)end ifrs.pagesize=12rs.absolutepage=pageurl=Pro1.asp?BigClassName=&BigClassName&SmallClassName=&SmallClassName&page=% a href=proshow.asp?id= target=_blankimg src= width=150 height=150 border=0 / %if i mod 4=0 thenresponse.write( )end ifrs.movenextif rs
5、.eof then exit fornext% 1 then% a href=首页 a href=上一页 %if page a href=下一页 a href=尾页 当前第/页 %sub ShowClassGuide()response.write 产品 >>if BigClassName= and SmallClassName= thenresponse.write 所有产品elseif BigClassName thenresponse.write & BigClassNam