A: 

It is just text. Remove it from the HTML surrounding it, run it through the YUI compressor, then put it back.

If it is generated by ASP.NET components - then you'd probably have to intercept it on the way out of ASP (e.g. with a proxy), and at that point is almost certainly isn't worth the effort.

David Dorward
+2  A: 

You might look into MBCompression It allows you to compress pretty much everything coming out of a .net app (including those lovely webresource.axd files).

This has a similiar effect as regular javascript compression. Beyond that, i'd still look into pulling out the inline scripts into separate files in order to remove duplication and allow the browser to cache that data.

Chris Lively
+4  A: 

Don't forget that there's a .NET port of YUI Compressor. :)

You can use it for post-build events or in a TFS build or just use the dll's in your own project(s).

Pure.Krome