Does anyone know how to create a string with (') that will not be converted to \u0027 when sent via AJAX post to consume a web service?
var SearchCriteria = "1=1";
if (tblSYS_SubscribersSearch.value.length > 0) {
SearchCriteria = "FirstName LIKE N'%" + Criteria + "%' OR LastName LIKE N'%" + Criteria + "%'";
}
var settings = {
"url": "<%=ConfigurationManager.AppSettings["EndPoint"].ToString()%>" + "/api/SYS_Subscriber/GetListPaged",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/json"
},
"data": JSON.stringify({
"ApiKey": Apikey,
"Fields": Fields,
"Criteria": SearchCriteria,
"SortOrder": SortOrder,
"SortDirection": SortDirection,
"PageIndex": PageIndex,
"PageSize": PageSize
}),
};