久久精品水蜜桃av综合天堂,久久精品丝袜高跟鞋,精品国产肉丝袜久久,国产一区二区三区色噜噜,黑人video粗暴亚裔

AspMVC基本操作

來(lái)自站長(zhǎng)百科
跳轉(zhuǎn)至: 導(dǎo)航、? 搜索

導(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)