asp.net cross domain form post: Parse Posted Data
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?
精彩评论