c# - ASP.NET Capture and replace output in Global.asax -
I need to change some data sent from each page of my site, and I think it's global. This is that I have tried with it yet:
Zero Application_PreSendRequestContent (Object Sender, EventArgs E) {System.IO.StreamReader sr = New System. IOrorder (Response.OutputStream); String output = sr.ReadToEnd (); Response.ClearContent (); Response.Write ("Test .."); } But it gives me an argument expression what am I doing wrong? Is there a better way of doing this?
Thanks
Is there a better way to do this?
A can be a better option for such a task.
How to modify the response to a request, see this article:.
Comments
Post a Comment