I am trying to read the POST Parameters of Sencha Touch 2 in Aspx Page.
And the Aspx is Called by the following way from Sencha Touch Framework(By Mobile Application Team).
Ext.Ajax.request({
url:'http://bookingsite.com/flight/Secure_Payment.aspx',
method:'POST',
disableCaching: false,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
jsonData: {
uniqueID:"24608b55-3f69-4814-9de3-ebc88fa95700",
totalFare:"3500"
},
success:function(response)
{
console.log(response.responseText);
}
failure:function(response)
{
console.log(response);
}});
The POST parameters of Sencha Touch is read by the following way in Asp.net(Secure_Payment.aspx)
protected void Page_Load(object sender, EventArgs e)
{
// Tried by the following ways.
string uniID = HttpContext.Current.Request.Form["uniqueID"];
string uniID = HttpContext.Current.Request["uniqueID"];
string uniID = HttpContext.Current.Request.Form.Get("uniqueID");
if (!string.IsNullOrEmpty(uniID))
{
ds = balLayer.GetEBSPaymentParams("uniID");
}
tripID=ds.Rows[0]["TripID"].ToString();
name = ds.Rows[0]["ContactFname"].ToString();
}
Here, the Data set always returns null value.
Please inform me how to read the POST parameters in Aspx page.