public class Person { public string Name{get;set;} public string Phone{get;set;} } view层 @model Model.Person @{ ViewBag.Title = "Add";} @using (Html.BeginForm("doAdd","person",FormMethod.Post) { } 1.通过request.form获取表单数据 pu
$.fn.GetPostData = function () { var data = {}; var k = false; $(this).find(".datacontrol").each(function (i, value) { var field = $(value).attr("name"); if (field == null) { field = $(value).attr("id"); } if (value.tagName =
原文:[ASP.NET Web API教程]5.2 发送HTML表单数据:URL编码的表单数据 注:本文是[ASP.NET Web API系列教程]的一部分,如果您是第一次看本系列教程,请先看前面的内容. 5.2 Sending HTML Form Data 5.2 发送HTML表单数据 本文引自:http://www.asp.net/web-api/overview/working-with-http/sending-html-form-data,-part-1 By Mike Wasson|