I am calling a web service method which return boolean value in json. But on front end i am getting response true{"d":null}. {"d":null} is appending in response.
Following is my web service code
[WebMethod]
public void CreateTeam(tblTeam team)
{
var result = BLL.Team.Add(team);
Context.Response.Flush();
Context.Response.Write(JsonConvert.SerializeObject(result));
}
Solutions which i tried:
- Add Context.Response.Flush();
- Use JsonConvert instead of JavaScriptSerializer
But both are not worked. How can i solve this? Please help?