I use this action in controller:

public JsonResult DoSomething(int id )
{
  char result = '0';
  ....
  return this.Json( result, JsonRequestBehavior.AllowGet );
}

Results are in double quotes: "0", "1", "2" etc.

How can I get results without double quotes as 0, 1, 2 etc. ?

有帮助吗?

解决方案

Use the correct type for result and you should get a non-string for the integer.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top