WIKI使用導(dǎo)航
站長(zhǎng)百科導(dǎo)航
站長(zhǎng)專題
- 網(wǎng)站推廣
- 網(wǎng)站程序
- 網(wǎng)站賺錢
- 虛擬主機(jī)
- cPanel
- 網(wǎng)址導(dǎo)航專題
- 云計(jì)算
- 微博營(yíng)銷
- 虛擬主機(jī)管理系統(tǒng)
- 開(kāi)放平臺(tái)
- WIKI程序與應(yīng)用
- 美國(guó)十大主機(jī)
AspMVC基本操作
來(lái)自站長(zhǎng)百科
導(dǎo)航: 上一頁(yè)
AspMVC基本操作
首先在Contorl/DemoCotorl.asp 添加代碼 管理員操作 表:admins 操作:Save,Del,List,Model '保存及修改/返回Bool Public Function Saveadmins(Req) Saveadmins = Contorl.SaveModel(Req,"admins") End Function '刪除 Public Function Deladmins(ID) Deladmins = Contorl.DelModel(ID,"admins") End Function '列表/數(shù)組中 Public Function Listadmins() Listadmins = Contorl.ListModel("admins","") End Function '實(shí)體/Key Public Function Modeladmins(ID) Set Modeladmins = Contorl.GetModel(ID,"admins") End Function
1.添加操作 表單: <form action="save.asp" method="post"> <input id = "username" name="username" type="text"/> </form> Asp代碼: Set Demo= new DemoControl Demo.saveadmins(Request) 2.查詢操作 多個(gè)對(duì)像查詢 Set Demo = new DemoControl AdminArr = Demo.Listadmins() Set Admin = AdminArr(0) 單個(gè)對(duì)像查詢 Set Admin = Demo.Modeladmins(AdminID) 3.修改操作 表單: <form action="save.asp" method="post"> <input id = "id" name="id" type="text"/> <input id = "username" name="username" type="text"/> </form> Asp代碼: Set Demo= new DemoControl Demo.saveadmins(Request) 4.刪除操作 Set Demo= new DemoControl Demo.Deladmins(AdminID)