以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  BUG收集  (http://www.foxtable.com/bbs/list.asp?boardid=12)
----  HTTPRequest接收BUG  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=12&id=120610)

--  作者:zoudezhao
--  发布时间:2018/6/20 14:06:00
--  HTTPRequest接收BUG
http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&replyID=812705&ID=120544&skin=1

原帖地址  无法直接获取或处理POST 的 XML格式数据

--  作者:有点甜
--  发布时间:2018/7/5 10:05:00
--  

回复楼上,这个不是bug。我用下面的代码测试,xml数据可以接收。

 

是不是你发送过来的数据本身就是有问题的?

 

Select Case e.Path
    Case "input.htm"
        Dim sb As New StringBuilder
        sb.AppendLine("<form action=\'accept.htm\' enctype=\'multipart/form-data\' method=\'post\' id=\'form1\' name=\'form1\'>")
        sb.AppendLine("产品: <input name=\'cp\' id=\'cp\'><br/><br/>")
        sb.AppendLine("客户: <input name=\'kh\' id=\'kh\'><br/><br/>")
        sb.AppendLine("单价: <input type=\'number\' name=\'dj\' id=\'dj\'><br/><br/>")
        sb.AppendLine("数量: <input type=\'number\' name=\'sl\' id=\'sl\'><br/><br/>")
        sb.AppendLine("日期: <input type=\'date\' name=\'rq\' id=\'rq\'><br/><br/>")
        sb.AppendLine("密码: <input type=\'password\' name=\'mm\' id=\'mm\'><br/><br/>")
        sb.AppendLine("支付方式: <br/>")
        sb.AppendLine("<input type=\'radio\' name=\'fs\' id=\'fs1\' value = \'支付宝\' checked>支付宝") \'注意同一组的radio,name属性相同,id属性不同
        sb.AppendLine("<input type=\'radio\' name=\'fs\' id=\'fs2\' value = \'微信\'>微信")
        sb.AppendLine("<input type=\'radio\' name=\'fs\' id=\'fs3\' value = \'微信\'>网银<br/><br/>")
        sb.AppendLine("会员: <input type=\'checkbox\' name=\'hy\' id=\'hy\'><br/><br/>")
        sb.AppendLine("<input type=\'submit\' name=\'sumbit\' id=\'sumbit\' value=\'提交\'>")
        sb.AppendLine("<input type=\'reset\' name=\'reset\' id=\'reset\' value=\'重置\'>")
        sb.AppendLine("<input type=\'button\' name=\'foxtble\' id=\'foxtable\' value=\'Foxtable主页\' >")
        sb.AppendLine("</form>")
        e.WriteString(sb.ToString)
    Case "accept.htm"
        Dim sb As New StringBuilder
        sb.AppendLine("接收到的数据有:<br/><br/>")
        For Each key As String In e.Values.Keys
            msgbox(e.Values(key))
        Next
        e.WriteString(sb.ToString)
End Select