Thanks for the replays,
I solve the problem.
Here is what I did:
1. setting contentType: "application/json; charset=utf-8" solve the problem for me.
here is copy/paste of the function:
findAll: function( params, success, error ){
$.ajax({
url: 'http://url/data.ashx',
type: 'GET',
contentType: "application/json; charset=utf-8",
dataType: 'json',
data: params,
success:this.callback(['wrapMany',success]),
error: error
});
},
2. On the asp.net handler side here is the code:
public void ProcessRequest(HttpContext context)
{
context.Response.Clear();
context.Response.ClearHeaders();
places p = new places();
p.Id = "2";
p.Regionalcode = "2";
List<places> l= new List<places>();
l.Add(p);
context.Response.ContentType = "application/json";
string out_ = Jayrock.Json.Conversion.JsonConvert.ExportToString(l);
context.Response.Write(out_);
}
I had a bit of a problem with JSON syntax ( WrapMany function was throwing error "length is undefined")
but i find out that if you sand only one object that object should be sand as a list of one object - [{"id":"2","regionalcode":"2"}]