/// <summary>
/// 获取post过来的数据
/// </summary>
/// <param name="page"></param>
/// <returns></returns>
private static string PostInput(System.Web.UI.Page page)
{
try
{
System.IO.Stream s = page.Request.InputStream;
int count = 0;
byte[] buffer = new byte[1024];
StringBuilder builder = new StringBuilder();
while ((count = s.Read(buffer, 0, 1024)) > 0)
{
builder.Append(Encoding.UTF8.GetString(buffer, 0, count));
}
s.Flush();
s.Close();
s.Dispose();
return builder.ToString();
}
catch (Exception ex)
{
throw ex;
}
}
时间: 2024-10-01 07:06:51