开发者

Client Side Binding using by Converting the WCF Services to JSON

We have a Requirement of Consuming the WCf Services which is hosted in IIS like http://localhost/someservice.svc. We would like to consume that Service via java script and bind my sample data controls called grid view on client side itself. I think this can be done by Serializing and deserialzing to JSON and consume the d开发者_开发技巧ata source and bind the grid controls. Pls Refer the below link http://forums.infragistics.com/forums/p/48035/258346.aspx I would like to Achieve my func like the above link. Can you pls guide me to achieve this Tasks. Thanks Regards N.Balaji


Balaji,

Yes, you can definitely enable your WCF service (whether within IIS or not) to use JSON.

You do need to make one choice: do you want to use that service from the ASP .NET AJAX framework, or do you want to create a more general solution that is not tied down to that framework's usage within the browser?

If it's the former, use WebScriptEnablingBehavior. If it's the latter, use WebHttpBehavior.

For either scenario, detailed instructions are available in the following two MSDN sections:

  • AJAX Integration and JSON Support
  • WCF Web Http Programming Model
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜