前端调用后端方法时要传递多个参数,在前端js中拼接xml形式的字符串: var args = "<?xml version='1.0' encoding='utf-8' ?>"; args += "<Bill>"; for (var i = 0; i < dataChange.length; i++) { if (dataChange[i].bghsl != undefined) { if (dataChange[i].gcsl !=
前文介绍了Form Data 形式传参,本文介绍json传参. WebApi及Model: public class ValuesController : ApiController { [HttpPost] public string GetData(string name,[FromBody]Woman woman) { return "我是" + name + ",我喜欢" + woman.Name; } [HttpPost] public string Ge