I have a JSON Client object that matters, as shown below:
{"Title":"Mr","FirstName":"S","LastName":"J","Birthday":"01/01/2011","Address":[{"Line1":"Line1","Line2":"Line2","City":"City","State":"State","Zip":"00000","County":"0000"},{"Line1":"Line11","Line2":"Line21","City":"City1","State":"State1","Zip":"11111","County":"1111"}],"Email":[{"Email":"s.j@sj.com","EmailType":"Personal"},{"Email":"s.j1@company.com","EmailType":"Work"}],"Phone":[{"Phone":"1231231234","PhoneType":"Mobile"},{"Phone":"1231232345","PhoneType":"Work"}]}
I need to get this data in Handlers / CustomerHandler.ashx in order to perform some database operations. My AJAX call is as follows:
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "Handlers/CustomerHandler.ashx",
data: Customer,
dataType: "json",
success: insertCustomerCallback
});
Dim customerJSON As String = HttpContext.Current.Request.Form("Customer") displayed as empty.