获取post的参数

            Stream stream = HttpContext.Request.Body;
            byte[] buffer = new byte[HttpContext.Request.ContentLength.Value];
            await stream.ReadAsync(buffer, 0, buffer.Length);
            string content = Encoding.UTF8.GetString(buffer);

需要url解码时

System.Web.HttpUtility.UrlDecode(content,Encoding.UTF8);

 

上一篇:extjs ajax 请求成功也会进入failure


下一篇:C# Aspose.Words 实现Word文档导出