Brady Kelly wrote:
I am currently busy with trying to find a mechanism to make a non-form, i.e. a sub-form (not allowed, but is a group of inputs and a URL) post via AJAX.
You could just create a JSON and pass it to the server in the "data" field of a jQuery.ajax request. If you are using C# with Webservices you could do this: (Using jQuery)
$.ajax({
url: "your.url.here/Method",
type: "POST",
data: {json:{a:10,b:20}},
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
var response = $.parseJSON(data.d);
}
});
wich in server will be
public string Method(object json){
//do your stuff here
}
or
$.ajax({
url: "your.url.here/Method",
type: "POST",
data: {a:10,b:20},
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
var response = $.parseJSON(data.d);
}
});
and server-side
public string Method(int a, int b){
//do your stuff here
}
Sorry, my english is bad!