Dim fl As String = "d:\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
Dim wb As New WeUI
Select Case e.Path
Case "edit.htm"
MessageBox.Show("|post|" & e.PostValues("aa") & "|post|" & e.PostValues("bb") & "|post|" & e.PostValues("cc") & "|get|" & e.getValues("aa") & "|get|" & e.getValues("bb") & "|get|" & e.getValues("cc"))
wb.AddForm("","form1","edit.htm")
With wb.AddInputGroup("form1","ipg1","客户资料")
.AddSelect("cc","cc","cccccc|高级会员|VIP会员")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("aa", "aa") '测试结果:post|cccccc
.Add("aa", "ac","") '测试结果:post|cccccc
.Add("aa", "bb","button")
.Add("aa", "cc","submit") '测试结果:post|cccccc
.Add("aa", "bc","reset")
.Add("aa", "aa").Value = "aaaaaa" '测试结果:post|aaaaaa|cccccc
.Add("aa", "ac","").Value = "aaaaaa" '测试结果:post|aaaaaa|cccccc
.Add("aa", "cc","submit").Value = "aaaaaa" '测试结果:post|aaaaaa|cccccc
.Add("aa", "dd","edit.htm?bb=bbbbbb") '测试结果:post|cccccc
.Add("aa", "ee","","edit.htm?bb=bbbbbb") '测试结果:get|bbbbbb
.Add("aa", "ff","button","edit.htm?bb=bbbbbb") '测试结果:get|bbbbbb
.Add("aa", "gg","submit","edit.htm?bb=bbbbbb") '测试结果:get|bbbbbb
.Add("aa", "ll").FormAction = "edit.htm?bb=bbbbbb" '测试结果:post|cccccc get|bbbbbb
.Add("aa", "mm","button").FormAction = "edit.htm?bb=bbbbbb"
.Add("aa", "nn","submit").FormAction = "edit.htm?bb=bbbbbb" '测试结果:post|cccccc get|bbbbbb
End With
e.WriteString(wb.Build)
End Select