Reputation: 2456
I am sending a request by ajax post request, then by asp classic how can I fetch the parameters send by this request
My code snippet is as below
var url = "get_data.asp"; var params = "lorem=ipsum&name=binny"; http.open("POST", url, true); http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http.setRequestHeader("Content-length", params.length); http.setRequestHeader("Connection", "close"); http.onreadystatechange = fetch_Data; http.send(params);
please help me
Upvotes: 1
Views: 678
Reputation: 31280
Since this is a POST request, you can treat it as if it were a form submission.
For example, if you have a "name" field:
myVariable = Request.Form("Name")
Upvotes: 0
Reputation: 175766
From the perspective of ASP its a POST request like any other, so;
x = Request.Form("lorem")
y = Request.Form("name")
http://www.codeguru.com/csharp/.net/net_asp/article.php/c19325/
Upvotes: 1