troubleshooting Question

consume json using

Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America asked on
7 Comments1 Solution20 ViewsLast Modified:
hi experts, I just want to learn how to bind json string to repeater & datatable.
Please show me how. I am not an expert of framework.


Return json string:
{"FleetID":6045,"Make":"Kenworth","Model":"T800","FleetMasterType":"Tow","FleetClassType":"Tow Truck","FleetClassSubType":"Heavy Duty Wrecker"},
{"FleetID":6046,"Make":"Freightliner","Model":"Business Class M2 106","FleetMasterType":"Tow","FleetClassType":"Tow Truck","FleetClassSubType":"Medium Duty Trucks Roll-back"}

public string GetFleetList(string FleetMasterType, string responseType)
            string RegIDvalue = "0";
            using (System.Net.WebClient client = new System.Net.WebClient())
                var reqparm = new System.Collections.Specialized.NameValueCollection();
                reqparm.Add("FleetMasterType", FleetMasterType);
                byte[] responsebytes = client.UploadValues(domain + "/api/Fleet/GetFleetList?type="+ responseType, "POST", reqparm);
                string responsebody = Encoding.UTF8.GetString(responsebytes);
                if (responseType == "xml")
                    RegIDvalue = GetResponseValue(responsebody, "Fleet", "FleetClassType");
                    RegIDvalue = responsebody;
            return RegIDvalue;
David H.H.Lee
Digital Marketing (Hospitality)
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros