0

If I submit a form using POST, the ASP.NET server can access each value by name. However, if I do it with javascript like:

$http({
    method: "POST",
    url: TDSV.ROOT_PATH + "/themes/" + data.id,
    params: { "xHttpMethodOverride": "PUT" },
    data: { "newContent": JSON.stringify({ properties: data.json.properties, "otherInfo": "hello world" }, null, "\t") },
    cache: false
});

It is all squashed together into a giant stream that I have to parse through. I have no interest in sending files this way. I just want to separate the strings by name. Is there a way to do this?

AaronF
  • 2,841
  • 3
  • 22
  • 32

1 Answers1

0

It looks like you are using WebForms, if that´s the case you must send the data in a different way.

Here is a tutorial, please take a look and let me know if that helps: http://www.bennadel.com/blog/2615-posting-form-data-with-http-in-angularjs.htm

Fedaykin
  • 4,482
  • 3
  • 22
  • 32
  • I'm not. It's an angular $http request to an ASP.NET MVC backend. I've figured out what went wrong, but thanks for the useful link! – AaronF Aug 15 '14 at 13:48