Having some code to look at would help diagnose the issue. Have you tried something like this? JQuery code: $.
Post('test. Ashx', {key1: 'value1', key2: 'value2'}, function(){alert('Complete! ');}) Then in your ProcessRequest() method, you should be able to do: string key1 = context.Request.
Form"key1" You can also check the request type in the ProcessRequest() method to debug the issue if(context.Request. RequestType == "POST") { // Request should have been sent successfully } else { // Request was sent incorrectly somehow }.
Having some code to look at would help diagnose the issue. Have you tried something like this? JQuery code: $.
Post('test. Ashx', {key1: 'value1', key2: 'value2'}, function(){alert('Complete! ');}); Then in your ProcessRequest() method, you should be able to do: string key1 = context.Request.
Form"key1"; You can also check the request type in the ProcessRequest() method to debug the issue. If(context.Request. RequestType == "POST") { // Request should have been sent successfully } else { // Request was sent incorrectly somehow }.
The POST data that you are sending to your HTTP Handler must be in querystring format a=b&c=d. And you can retrieve it on the server-side using Request"a" (will return b), and so on.
Sorry, but I don't get it. How would the data be POSTed if I send it in a Querystring :S . Can you explain a bit more what you are suggesting?
If you are saying that I should create a querystring and append that to my URL than that wouldn't work due to the URL length limit. – Ali Kazmi May 26 '09 at 6:00 I think he means to URL-encode the data, delimited by ampersands (&), just like in a query string, except in the request body, not in the URL. JQuery should handle this for you automatically.
– Mark Cidade Jan 28 at 21:21.
I was having the same problem, and eventually figured out that setting the content type as "json" was the issue... contentType: "application/json; charset=utf-8" That's a line some popular tutorials suggest you to add in the $ajax call, and works well with ASPx WebServices, but for some reason it doesn't for an HttpHandler using POST. Hard to catch since values in the query string work fine (another technique seen in the web, though it doesn't makes much sense to use POST for that).
I also had the same problem. It was an client/AJAX problem. I had to set the AJAX call request header "ContentType" to application/x-www-form-urlencoded to make it work.
Faced similar problem. After correcting all issues, there was one more thing I missed in web. Config - to change verb as "*" OR "GET,POST".
After that everything worked fine. ...
I am trying to send a large chunk of data over to a HTTP handler. I can't send it using GET because of the URL length limit so I decided to POST it instead. The problem is that I can't get at the values.
Form shows that it has 0 items. So is there a way that I can POST data to a HttpHandler?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.