This is a migrated thread and some comments may be shown as answers.

How do i connect to a webservices using kendo

0 Answers 131 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Edmund
Top achievements
Rank 1
Edmund asked on 19 Jan 2012, 12:38 PM
I have created my web service method as

       [WebMethod(Description = "Returns the Enrolled members.")]
       [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
     
        public string LoadData()
        {
            HealthmanagementDataContext db = new HealthmanagementDataContext();
            var linq = from s in db.Edmund_Reporting_Counter()
                       select s;
            string jsonStr = JsonConvert.SerializeObject(linq);


            return jsonStr;
        }
The problem is when i try to get the result from the web service on client side as
 $("#chart").kendoChart({
                        theme: $(document).data("kendoSkin") || "default",

                        dataSource: {
                            transport: {
                                read: {

                                    url: "http://localhost:2316/Service1.asmx/LoadData",   // the problem
                                    dataType: "json"
                     
                                }
                            }
                          
                        },
I can't get back the data coming from the web service.
Thanks,

No answers yet. Maybe you can help?

Tags
Data Source
Asked by
Edmund
Top achievements
Rank 1
Share this question
or