ale*_*exn 2 c# asp.net global-asax
我需要替换从我网站上的每个页面发送的一些数据,我认为使用Global.asax进行处理.这是我到目前为止尝试过的:
void Application_PreSendRequestContent(object sender, EventArgs e)
{
System.IO.StreamReader sr = new System.IO.StreamReader(Response.OutputStream);
String output = sr.ReadToEnd();
Response.ClearContent();
Response.Write("Testing..");
}
Run Code Online (Sandbox Code Playgroud)
但这给了我一个ArgumentException.我究竟做错了什么?有没有更好的方法来做到这一点?
谢谢
| 归档时间: |
|
| 查看次数: |
6360 次 |
| 最近记录: |