开发者

Access HTTP POST data in OpenNETCF Padarn

开发者 https://www.devze.com 2022-12-29 04:57 出处:网络
Anyone know how to access HTTP POST data in the Padarn web server? They wrote the POST data will be in Requ开发者_如何学JAVAest.Form, but there is always nothing.We\'d need to see more of your code.Is

Anyone know how to access HTTP POST data in the Padarn web server? They wrote the POST data will be in Requ开发者_如何学JAVAest.Form, but there is always nothing.


We'd need to see more of your code. Is this a Page or is it a custom IHttpHandler? What version of Padarn are you using? I just tested the following and it output the POST data as expected:

public class Target : Page
{
    protected override void Page_Load(object sender, EventArgs e)
    {
        Response.Write("<b><u>Request.Form.Keys</u></b><br>");

        Response.Write("<ul>");
        foreach (var key in Request.Form.AllKeys)
        {
            Response.Write(string.Format(
              "<li>Key: '{0}'    Value: '{1}'", key, Request.Form[key]));
        }
        Response.Write("</ul>");

        // flush
        Response.Flush();
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号