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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -