以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 测试时刷新会重新写入数据 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=170834) |
-- 作者:sunion -- 发布时间:2021/8/9 9:47:00 -- 测试时刷新会重新写入数据 用upload上传照片,出现“增加成功”提醒(图一),如果点击浏览器刷新按钮就会重新写入数据(图二),如何杜绝刷新重新写入数据呢? 此主题相关图片如下:微信截图_20210809094159.png Dim nms() As String = {"标题","性别"} Dim dr As DataRow = DataTables("员工").AddNew() For Each nm As String In nms dr(nm) = e.PostValues(nm) Next For Each key As String In e.Files.Keys If key = "up1" Then Dim lst As List(of String) = dr.Lines("照片") For Each fln As String In e.Files(key) Dim n As String = Format(Date.Now,"yyyyMMddHHmmssffff") & fln e.SaveFile(key, fln, ProjectPath & "Attachments\\" & n) lst.Add(n) Next dr.Lines("照片") = lst End If Next \'保存并生成增加成功提示页面 dr.save() With wb.AddMsgPage("","msgpage","增加成功", "好好学习,天天向上") \'生成成功提示页 .AddButton("btn1","继续增加","diaryadd.htm") End With e.WriteString(wb.Build) [此贴子已经被作者于2021/8/9 9:47:28编辑过]
|
-- 作者:有点蓝 -- 发布时间:2021/8/9 9:54:00 -- 使用find查询表格是否已经有系统标题的数据,如果有就不要新增了:http://www.foxtable.com/webhelp/topics/0396.htm |