'第80到第94行代码用于生成首页。
Case "", "default.htm" '首页
wb.AddPageTitle("", "pageheader", "智能管理系统", "由二八科技有限公司开发")
With wb.AddGrid("", "g1")
.Add("c1", "销售开单", "./images/button.png").Attribute = ""
.Add("c2", "采购入库", "./images/cell.png", "AddNew.htm")
.Add("c15", "退出", "./images/exit.png", "exit.htm") '退出登录
End With
'第80到第94行代码用于生成首页。
End Select
e.WriteString(wb.Build) '生成网页
下面二句的网址这样写可以吗?
.Add("c2", "采购入库", "./images/cell.png", "AddNew.htm") 其中: AddNew.htm
.Add("c15", "退出", "./images/exit.png", "exit.htm") 其中: exit.htm
这个可以,应该是调用自定函数的函数出问题了
这个是自定义的函数,名为:one
Dim e As RequestEventArgs = Args(0)
Select Case e.path
Case ""
Functions.Execute("ahome", e)
Case Else
Dim dr As DataRow = DataTables("控制台").SQLfind("path='" & e.Path.Replace("'", "''").Replace("", "''") & "'")
If dr IsNot Nothing Then
If dr("IsAsync") = True Then
e.AsyncExecute = True
Functions.AsyncExecute(dr("function"), e)
Else
Functions.Execute(dr("function"), e)
End If
Else
Dim wb As New weui
wb.InsertHTML("<h3>页面丢失了!!</h3>")
wb.AppendHTML("<script>console.warn('" & e.Path & "不在httpcase表,请检查是否没有设置.')</script>")
e.WriteString(wb.Build)
End If
End Select
我在HttpRequest事件,直接调用这个函数
Functions.Execute("one", e)
学会调试
Dim e As RequestEventArgs = Args(0)
msgbox(e.path)
Select Case e.path
Case ""
Functions.Execute("ahome", e)
Case Else
Dim dr As DataRow = DataTables("控制台").SQLfind("path='" & e.Path.Replace("'", "''").Replace("", "''") & "'")
If dr IsNot Nothing Then
msgbox(dr("function"))
If dr("IsAsync") = True Then