开发者

asp.net cross domain form post: Parse Posted Data

开发者 https://www.devze.com 2023-04-04 17:22 出处:网络
I have an .aspx page which has the \'form\' tag without the runat=server; it is posting some regular html form elements to another cross domain .aspx page. I can see inside the Firebug that the target

I have an .aspx page which has the 'form' tag without the runat=server; it is posting some regular html form elements to another cross domain .aspx page. I can see inside the Firebug that the target page does get the posted data:


Parameters application/x-www-form-urlencoded

billingname FirstName LastName

btnpaynow pay now

subtotal 870.0000


but when I try to use the following code nothing get written to the page.

    NameValueC开发者_运维问答ollection nvc = Request.Form;
    string subtotal = "NotSet";
    if (!string.IsNullOrEmpty(nvc["subtotal"]))
    {
        subtotal = nvc["subtotal"];
    }
    Response.Write("subttoal: " + subtotal);

note: same code works if I post to the same domain. So what's happening?


Try Request["subtotal"]. Have you written method='post' at form tag?

0

精彩评论

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