WCF/WF - i want json format for wcf service .i have dataset using ado.ne how can i convert string.

Asked By svm satya on 24-Feb-13 10:50 AM
i have dataset using ado.net and sql server.i want convert dataset into string .can u help me.i dont have time .please give me code
meena damwani replied to svm satya on 08-Mar-13 07:13 AM
Hello,

u can use below code to get response in json format :

pass dataset object to get json data.

add namespace : using System.Runtime.Serialization.Json;

 var serializer = new JavaScriptSerializer();
           serializer.Serialize(obj);