How to create a webservice returns json string only?

Gunmanes

New Member
I've set the web.config to let it support 'get' request.\[code\]<webServices> <protocols> <add name="HttpPost"/> <add name="HttpGet"/> <add name="HttpSoap"/> <add name="Documentation" /> </protocols></webServices>\[/code\]Then,i want the webservice just returns json strings,not xml!but i've set [ScriptMethod(ResponseFormat = ResponseFormat.Json, XmlSerializeString = false)]it not works,still returns strings with jsonstrings....I don't want to set contentType in the page file,just use the default!
 
Back
Top