我们的angular2应用程序之一是将一些数据发布到aspx页面(使用HTTPPOST)。我可以在Developer Tools(在浏览器中)的Network下看到发布的值。
我只想将该值传递给另一个Web服务或显示在页面主体中。
这可能吗?
答案 0 :(得分:1)
str = Request.InputStream;
// Find number of bytes in stream.
strLen = Convert.ToInt32(str.Length);
// Create a byte array.
byte[] strArr = new byte[strLen];
// Read stream into byte array.
strRead = str.Read(strArr, 0, strLen);
// Convert byte array to a text string.
strmContents = "";
for (counter = 0; counter < strLen; counter++)
{
strmContents = strmContents + strArr[counter].ToString();
}