Foxtable(狐表)用户栏目专家坐堂 → msgbox(0)没有执行,数据库写入数据没有成功


  共有1700人关注过本帖平板打印复制链接

主题:msgbox(0)没有执行,数据库写入数据没有成功

帅哥哟,离线,有人找我吗?
zhangjian222200
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1536 积分:10849 威望:0 精华:0 注册:2016/9/12 11:18:00
msgbox(0)没有执行,数据库写入数据没有成功  发帖心情 Post By:2017/3/14 14:26:00 [只看该作者]

Dim e As RequestEventArgs = args(0)                             '注册第1页,注册
Select Case e.Path
    Case "register.htm"
        If e.PostValues.Count = 0 Then
            Dim wb As New weui
            wb.AddTopTips("","toptip1","") '用于显示动态错误提示
            wb.AddPageTitle("","pageheader","**","***********")
            wb.AddForm("","form1","register.htm").Attribute=“”   ’="ohsubm1t='r_eturn va1idit()'"
            With wb.AddInputGroup("form1","ipg1","快速注册")
                With .AddInputCell("ic1")  '通过InputCell增加输入框(1表示突出显示,2表示红色警示图标)
                    .AddLabel("lsj","手机",0)  '增加标签(0显示在左边)
                    .AddInput("isj","text",1).PlaceHolder= "请输入手机号"  '增加输入框(0靠左显示,1居中显示,2靠右显示)
                End With
                With .AddInputCell("ic2")
                    .AddLabel("lyz","验证",0)
                    .AddInput("iyz","text",1).PlaceHolder= "请输入验证码"
                    .AddVcodeButton("vyz","获取验证码",2)  '0靠左显示,1居中显示,2靠右显示
                End With
                With .AddInputCell("ic3")
                    .AddLabel("lmm","密码",0)
                    .AddInput("imm","text",1).PlaceHolder= "请输入密码"
                End With
                .AddSelect("sxb","性别","|男|女")
                '.AddSwitch("fuwuxieyi","同意协议") '.Value = "是"
                With wb.AddButtonGroup("form1","btg1",True)
                    .Add("btn1", "同意协议注册", "submit")  
                    .Add("btn2", "服务协议", "","/protocol.htm").Kind = 1
                End With
            End With
            wb.AppendHTML("<script src='./lib/ajaxform.js'></script>") '引入脚本文件
            e.WriteString(wb.Build)
        Else     ‘else上面都正确执行了,引用js验证正常,但是单击按钮:同意协议注册,下面的代码没有执行,第一行msgbox(0)也没有执行,数据库写入数据没有成功?
            msgbox(0)
            Dim wb As New weui
            Dim nms() As String = {"isj","imm","sxb"} 
            Dim dr As DataRow = DataTables("会员资料").AddNew()
            For Each nm As String In nms
                If e.PostValues.ContainsKey(nm) Then
                    dr(nm) = e.PostValues(nm)
                End If
            Next
            '保存并生成增加成功提示页面
            dr.save()
            With wb.AddMsgPage("","msgpage","增加成功", "好好学习,天天向上") '生成成功提示页
                .AddButton("btn1","完善资料","/fillout.htm")
            End With
            e.WriteString(wb.Build)
        End If
End Select
[此贴子已经被作者于2017/3/14 14:56:40编辑过]

 回到顶部