I have created the services using the asp.net web api and deployed it in the IIS when i call the controller with the action name separate in the browser say
i could see the result returned as JSON like this
[{"ContactId":1,"UserId":1,"ContactName":"nithya","ContactEmail":"nithya","ContactPhoneNumber":"8123021136","ContactPhoto":"/Images/"},{"ContactId":2,"UserId":1,"ContactName":"piyush","ContactEmail":"piyush","ContactPhoneNumber":"123123123","ContactPhoto":"/Images/"},{"ContactId":3,"UserId":1,"ContactName":"govind","ContactEmail":"govind","ContactPhoneNumber":"123123123","ContactPhoto":"/Images/Images"},{"ContactId":4,"UserId":1,"ContactName":"Meera","ContactEmail":"Meera","ContactPhoneNumber":"123123123","ContactPhoto":"/Images/"},{"ContactId":5,"UserId":2,"ContactName":"test","ContactEmail":"test","ContactPhoneNumber":"12312312312","ContactPhoto":"/Images/"}]"
Next i have created an HTML file in that i have used an Kendo UI Auto Complete box.
when i try to consume it with the following code in the HTML
$(document).ready(function(){ var dataSource=new kendo.data.DataSource({ transport:{ read:{ url:"api/controller/action" } } }); $("#customers").kendoAutoComplete({ dataSource:dataSource, dataTextField:"ContactName", minLength:1 }); });
But i was not able to get any response only im recieve the response header not the response body is there any way to send them from the web API other than this or how to approach this.