欧美特黄不卡,涩涩视频在线,成人国产精品一区二区网站,亚洲一区二区三区欧美

當前位置:雨林木風下載站 > 技術開發教程 > 詳細頁面

手把手教你運用VB來創建ASP組件(7) 

手把手教你運用VB來創建ASP組件(7) 

更新時間:2022-05-14 文章作者:未知 信息來源:網絡 閱讀次數:

(2)DeleteCdInformation.asp程序

  點擊每條信息后的刪除鍵就會從表中把該條信息刪除,它也調用了我們剛剛注冊的組件。限于篇幅,我只把最重要的幾行代碼寫出:

〈%

Dim CD_Info

Set CD_Info =Server.CreateObject(“CD.CD_Handle”)

CD_Info.Delete Request.QueryString(“ID”)

%〉

(3)AddCDInformation.html

  本程序是一個純HTML文本,只出現一個表單,讓你填寫新的CD信息,然后再發給InsertintoDB.asp來加入數據庫。

〈html〉

〈head〉

〈meta http-equiv="Content-Language" content="zh-cn"〉

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

〈title〉請您添加一條CD信息〈/title〉

〈/head〉

〈body〉

〈form method="POST" action="InsertintoDB.asp"〉

〈p〉 〈/p〉

〈p〉  請您添加一條CD信息〈/p〉

〈table border="1" cellspacing="1" width="34%" height="109"〉

〈tr〉

〈td width="24%" height="16"〉

〈p align="center"〉CD號〈/td〉

〈td width="76%" height="16"〉〈input type="text" name="ID" size="24"〉〈/td〉

〈/tr〉

〈tr〉

〈td width="24%" height="16"〉

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

〈td width="76%" height="16"〉〈input type="text" name="Name" size="24"〉〈/td〉

〈/tr〉

〈tr〉

〈td width="24%" height="16"〉

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

〈td width="76%" height="16"〉〈input type="text" name="Author" size="24"〉〈/td〉

〈/tr〉

〈tr〉

〈td width="24%" height="16"〉

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

〈td width="76%" height="16"〉〈input type="text" name="Price" size="24"〉〈/td〉

〈/tr〉

〈tr〉

〈td width="24%" height="95"〉

〈p align="center"〉簡介〈/p〉

〈p〉 〈/td〉

〈td width="76%" height="95" valign="top"〉〈textarea rows="4" name="Information" cols="22"〉〈/textarea〉〈/td〉

〈/tr〉

〈tr〉

〈td width="100%" height="15" colspan="2"〉

〈p align="center"〉〈input type="submit" value="提交" name="B1"〉〈input type="reset" value="取消" name="B2"〉〈/td〉

〈/tr〉

〈/table〉

〈/form〉

〈p〉   〈/p〉

〈/body〉

〈/html〉

(4)InsertIntoDB.asp程序,用到了組件中Add方法

〈HTML〉

〈HEAD〉

〈TITLE〉〈/TITLE〉

〈/HEAD〉

〈BODY〉

〈%DIM Insert_CD

set Insert_CD =Server.CreateObject("CD.CD_Handle")

Insert_CD.Add request.form("ID"),request.form ("Name"),request.form("Author"),request.form("Price"),request.form("Information")

%〉

〈p〉您已成功的加入一條書目〈/p〉

〈form name="A" Method="POST" Action="ListCdInformation.asp"〉

〈input type="SUBMIT" Value="返回" name="B1"〉

〈/form〉

〈/body〉

〈/html〉

六、總結

  上面我簡要的介紹了組件的定義以及使用VB來編寫ASP中組件的方法,其實上面所舉的例子只是很粗淺的例子,相信大家寫出的程序一定會比我的更好,我想如果有機會的話,我還會謝謝如何使用VC++和Java來編寫COM組件,因為我覺得,如果你沒有掌握COM組件,你也就沒有掌握ASP的精髓。

溫馨提示:喜歡本站的話,請收藏一下本站!

本類教程下載

系統下載排行

主站蜘蛛池模板: 习水县| 汪清县| 娱乐| 从化市| 永修县| 卓资县| 武功县| 南皮县| 新蔡县| 兴安县| 且末县| 陆良县| 榆中县| 三原县| 柳河县| 西昌市| 大安市| 平南县| 杭锦后旗| 漠河县| 丹寨县| 通道| 嘉定区| 茌平县| 望谟县| 灌阳县| 德化县| 黑水县| 咸丰县| 清流县| 古田县| 蛟河市| 包头市| 沙湾县| 类乌齐县| 湛江市| 扬中市| 普定县| 平利县| 酒泉市| 沈阳市|