当前位置: 移动技术网 > IT编程>开发语言>.net > 手把手教你使用VB来创建ASP组件(6)

手把手教你使用VB来创建ASP组件(6)

2019年01月22日  | 移动技术网IT编程  | 我要评论

天下聊聊天室,捆钞教程,钛棒价格

五、asp程序的编写

(1) listcdinformation. 程序

  这个程序实现的是检索,把检索的结果显示为一张表,使用了刚才我们定义的。它打开表,然后列举每一张cd的信息。

〈%

dim cd_info

set cd_info= server.createobject("cd.cd_handle")

%〉

〈html〉

〈head〉

〈meta http-equiv="content-type" content="text/html; charset=gb2312"〉

〈title〉cd信息列表〈/title〉

〈/head〉

〈body〉

〈b〉〈p align="center"〉cd信息列表〈/p〉〈/b〉

〈table border="2" cellspacing="1"〉

〈tr〉

〈td〉〈p align="center"〉cd编号〈/td〉

〈td〉〈p align="center"〉cd名〈/td〉

〈td〉〈p align="center"〉作者〈/td〉

〈td〉〈p align="center"〉价格〈/td〉

〈td〉〈p align="center"〉cd简介〈/td〉

〈/tr〉

〈tr〉〈/tr〉

〈%dim id

dim name

dim author

dim price

dim information

初始化cd列表

cd_info.opendb

while cd_info.iseof =false

cd_info.nextcd id,name,author,price,information

%〉

〈tr〉

〈td〉〈%=id%〉〈/td〉

〈td〉〈%=name%〉〈/td〉

〈td〉〈%=author%〉〈/td〉

〈td〉〈%=price%〉〈/td〉

〈td〉〈%=information%〉〈/td〉

〈td〉〈form name = "delete" method =post action ="deletecdinformation.asp?id=〈%=id%〉"〉

〈input type "submit" values="删除此条" name="delete2"〉

〈/form〉

〈/td〉

〈/tr〉

〈%

wend

%〉

〈/tabel〉

〈form name="add" method ="post" action="addcdinformation.asp"〉

〈input type ="submit" value="添加一条cd信息" name="add2"〉

〈/form〉

〈/body〉

〈/html〉

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网