ASP.NET MVC4 WebAPI和使用C#和Jquery发布XML数据。 [英] ASP.NET MVC4 WebAPI and Posting XML data using C# and Jquery.

查看:61
本文介绍了ASP.NET MVC4 WebAPI和使用C#和Jquery发布XML数据。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Api开发的新手,也是MVC的新手,我已经开始在VS 2010中使用sp1和MVC创建一个API,它将从其他地方使用应用程序(网站)使用Jquery或C#。现在我想在语言中使用API​​。获取值完成
但无法发布(插入数据),因为数据将是Json字符串或XML ....所以请发送一些链接In 其中显示了如何发送XML数据或Json的方式。  

I am new for Api development and also for MVC, I have started to create a API in VS 2010 with sp1 and MVC which shall be used from other application (web site) using Jquery or C#. Now I want to consume the API in bothe the language. Fetching value is completed but unable to post (Insert data ) as the data will be a Json string OR XML .... So please send some link In  which shows the way how to send XML data or Json. 

由于我的添加功能需要我的自定义类的对象,因此我无法理解逻辑。

As I am unable to understand the logic as my add function takes a object of my custom class.

谢谢

推荐答案

MSDN代码示例是一个很好的起点。
此处
是一个用于  CRUD的  ; Web API和JQuery客户端。
The MSDN code samples are a good place to start. Here is one for CRUD with Web API and a JQuery client.


这篇关于ASP.NET MVC4 WebAPI和使用C#和Jquery发布XML数据。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆