Dim fl As String = "d:\project\foxtable\web" & e.path
If filesys.FileExists(fl)
Dim idx As Integer = fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
'以下是动态生成网页的代码
Select Case e.Path
Case "addnew.htm"
Dim wb As New WeUI '定义一个基于weui框架的网页生成器
wb.AddForm("","form1","addnew.htm")
With wb.AddInputGroup("form1","ipg1","新增订单")
.AddSelect("cp","产品","PD01|PD02|PD03|PD04|PD05")
.AddInput("gy","雇员","text")
.AddInput("kh","客户","text")
.AddInput("dj","单价","number")
.AddInput("zk","折扣","number")
.AddInput("sl","数量","number")
.AddInput("rq","日期","date")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btnok","确定")
End With
e.WriteString(wb.Build) '生成网页
End Select