stripping tags from source on render

L

Lance

Hi,
What way could I strip certain tags (like HTML comments) from the HTML being
delivered to the client? I don't mean what regexp to use, but where do I
put this stripping code? I'm thinking something in the Global.asax, but I
can't find any reference to it having a Render or PreRender event or how to
tie into them if I did! I'd ideally like some help along the lines of:

1 - Where to put the code
2 - example of how to alter the source being delivered to the client

Thanks,
Lance
 
G

Guest

Hi Lance,

I'd look at the Page.Render event. This takes an HtmlTextWriter parameter
where you can modify the contents before calling the base.Render method.

HTH
 
L

Lance

I'd have to call the code from every page using this method, right? If I
could call it from one location (global.asax) that would be great!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top