Use Response.Filter to intercept your HTML(aspnetlibrary.com)

submitted by nemanujdanemanujda(185) 5 years, 1 month ago

You can use Response.Filter to get a reference to the final HTML that will be sent to the client

2 comments |category: |Views: 21

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by senfosenfo(881) 5 years, 1 month ago 0

I admit that i didn't know about the Filter property; but, in all honesty, I really can't think of any reason that I'd actually use this in a production environment. I realize that this sample was just to prove a point, so can anybody give a good reason that you would want to do this?

Reply

posted by ca8msmca8msm(429) 5 years, 1 month ago 0

I use it to alter the HTML that a 3rd party component outputs. I don't have direct access to change this from the control itself so this was an easy way of manipulating the HTML. This could have also been done with a httpModule (or on each page by overriding the page's Render method) however, I thought this was a more suitable approach as I could just apply it to whichever pages I wanted with one line of code.

Reply

information Login or create an account to comment on this story