Linked Questions

0 votes
0 answers
24 views

WebApi Routing to Action with Object Parameter [duplicate]

I'm trying to set up routing for a Get action that has an object as it's only parameter. I have the following code: public class LuteImage { public string Id { get; set; } public string ...
Ant's user avatar
  • 462
136 votes
12 answers
215k views

Multiple HttpPost method in Web API controller

I am starting to use MVC4 Web API project, I have controller with multiple HttpPost methods. The Controller looks like the following: Controller public class VTRoutingController : ApiController { ...
Habib's user avatar
  • 221k
39 votes
2 answers
107k views

How to pass complex object to ASP.NET WebApi GET from jQuery ajax call?

I have the following complex object in JavaScript which contains filter options var filter={caseIdentifiter:'GFT1',userID:'2'}; which I want to pass to an ASP.NET MVC4 WebApi controller GET [...
ChrisP's user avatar
  • 10k
33 votes
2 answers
16k views

How to disable Chunked Transfer Encoding in ASP.Net C# using HttpClient

I'm trying to post some JSON to an external API which keeps failing because my content is chunked. Please can someone tell me how to disable it? I'm using ASP.NET 5 so think I'm using System.Net.Http,...
dontbesorry80's user avatar
8 votes
3 answers
16k views

Json.NET StringEnumConverter not always working

I have an enum: public enum FilterOperator { [EnumMember(Value = "eq")] Equals, [EnumMember(Value = "gt")] GreaterThan, [EnumMember(Value = "lt")] ...
Supergibbs's user avatar
  • 1,451
1 vote
2 answers
2k views

Pass querystring with object to WebAPI?

Is it possible to pass both a querystring along with a model object from angular to webapi? My first parameter is always filled however, the model parameter is null even though I see all the data in ...
Terrance Jackson's user avatar
1 vote
3 answers
2k views

Ajax not passing array to Controller Action?

Iv searched related questions, but still not able to get this to work in my situation. I am working in ASP.NET MVC. I have a report that has 3 filters. Only 1 value can be selected for Filters 1 and ...
Reeggiie's user avatar
  • 792
1 vote
1 answer
1k views

Web API not populating parameter object

Web API not populating parameter object After researching a number of articles (most specifically: Complex type is getting null in a ApiController parameter but others as well) I have arrived at the ...
Cos Callis's user avatar
  • 5,054
1 vote
1 answer
1k views

Using JsonConverter on GET request in Web Api

I have a abstract class with an JsonConverter attribute like so: [JsonConverter(typeof(SurveyItemConverter))] public abstract class SurveyItem:ISurveyItem { private class SurveyItemConverter : ...
Mike_G's user avatar
  • 16.4k
0 votes
2 answers
1k views

How to pass model values in a parameter

I want to pass values using model as parameter. This is basically the mvc web api app This is my Model class public class ConversionModel { public double value { get; set; } public int qty {...
Ahmed's user avatar
  • 25
0 votes
0 answers
548 views

Web API GET method with two complex parameters

I have a Web API program that has 8 get methods. Each method can get 2 parameters - filters and sorts. filters - a json object that contains all the params you can filter by sorts - an array that ...
Lior Dolev's user avatar
0 votes
2 answers
69 views

What is returning in JQuery ajax here?

I am trying to write an ajax user search.I have this text field: <input type="text" id="userSearch" class="search-query" placeholder="Search"> And this jQuery for it in a .js file: $("#...
Hamid Reza's user avatar
  • 2,935
0 votes
1 answer
54 views

String property not deserialized

I don't understand why only the string property Search.Value is not being deserialized in my ASP.NET MVC5 Controller. Please see this: The Json-structure sent from the Client: { "draw":1, // .....
peter's user avatar
  • 2,103