I know there are tons of answers for this topic, but couldn\'t find the solution to my issue. I have an ASP.NET MVC Web API that looks like this:
[HttpGe
**Following are two parameter Enum and objSearch **
var Enum = "ABCD";
var objSearch = [
{"Name":"Navjot Angra","Age":23},
{"Name":"Nav","Age":22}];
//this is ajax method
$.ajax({
type: "GET",
var GatwayUrl ='http//2937/' (//Your url)
url: GatwayUrl + 'api/Certificate/GetDetail/?Enum=' + Enum +'+&objSearch='+ JSON.stringify(objSearch),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (result) {
if (result) {
alert("Your Code");
} }
});
//this part is web api part
[HttpGet]
public IHttpActionResult Fetch([FromUri]string Enum, [FromUri]string objSearch) {
IHttpActionResult action=null; return action;
}