Dim e As RequestEventArgs = args(0)
Dim wb As New weui
Dim PageNumber As Integer = e.GetValues("page")
Dim PrimaryKey As String = e.GetValues("key")
Dim PageURL = "faceid.htm?page=" & PageNumber
If e.PostValues.Count = 0 AndAlso e.Files.Keys.count = 0 Then '生成编辑页面
Dim dr As DataRow = DataTables("USERSlist").SQLFind("[工号]=" & PrimaryKey)
If dr IsNot Nothing Then
wb.AddForm("", "form1", "faceid.htm?" & "page = " & PageNumber & "&key = " & PrimaryKey)
'
……
Else
接收数据的代码, 比如
For Each key As String In e.Files.Keys
For Each fln As String In e.Files(key)
e.SaveFile(key, fln, "d:\web\uploadfiles\" & fln) '保存接收到的文件
Next
Next
e.WriteString("OK")
End If
js
function afterSubmit(result){
hide("tst1");
if (result=='OK') {
show("tst2");
//这一句去掉location="upload.htm";
}
else{
show("tst3",2000);
}
}