开发者

My Kingdom for a working simple C# webservices/json/jquery walkthrough?

开发者 https://www.devze.com 2023-03-27 09:21 出处:网络
I\'m familiar with C# and typically create asp.net webforms apps.I\'ve spent a couple 开发者_如何学JAVAof days now trawling the net for the \'simplest but workable\' way to setup webservices for ajax.

I'm familiar with C# and typically create asp.net webforms apps. I've spent a couple 开发者_如何学JAVAof days now trawling the net for the 'simplest but workable' way to setup webservices for ajax. My mind is now full of options - scriptservices, asmx, httphandlers, page methods, wcf, and so forth. My requirements are pretty simple really:

  1. I'd like to get various datasets (normally LINQ generated collections in C#, in my asp.net webforms apps) over to javascript to use charting/viz tools like highcharts (www.highcharts.com)
  2. Call server side methods from javascript, with parameters (eg to apply a new criteria, add a record to the backend db).
  3. Minimum things to setup/debug - the less web.config, .cs files linked to .svc files, and other dependencies, the happier I'll be.

As I seem to find in my chosen Microsoft ecosystem, there seem to be many ways to do it. I've downloaded a couple of examples that work, but replicating the steps to create them is not obvious.

Any wisdom from people who have tried the methods and had success? It's driving me crazy! I just want a basic chart! Postbacks are starting to sound tolerable :)

Any kind of proven 'working' walkthrough or linked example would be great.

Cheers

Mark


I'm quite fond of using JavascriptSerializer and JQuery.

This is a good tutorial although it is MVC focussed:

http://www.highoncoding.com/Articles/770_Implementing_Dynamic_DropDownList_in_ASP_NET_MVC_3_Framework.aspx

0

精彩评论

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