Am using simple webservice “.asmx”.In my web service returning some data like:
<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://tempuri.org/">
{"Table":[{"minlatency":16.0,"Time":"\/Date(1328248782660+0530)\/"},{"minlatency":7.0,"Time":"\/Date(1328248784677+0530)\/"},{"minlatency":13.0,"Time":"\/Date(1328248786690+0530)\/"},{"minlatency":6.0,"Time":"\/Date(1328248788690+0530)\/"},{"minlatency":20.0,"Time":"\/Date(1328248790707+0530)\/"}]}</string>
I am using:
[ScriptMethod(ResponseFormat = ResponseFormat.Json, XmlSerializeString = false)]
after [webmethod]in my service,and it is giving error in ajax callback,i want return values in json format.
I had the same issue a few weeks ago, I found that using the following as my service
and the following javascript (using mootools)
the previous is a function for getting Googlemaps markers from an SQL server database in ASP.NET c#