1
votes

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

2
Are you looking for VBScript code to retrieve the values of POSTed parameters? - cdeszaq

2 Answers

1
votes

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/

0
votes

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")