As an extension to this question here Linking JavaScript Libraries in User Controls I was after some examples of how people are concatenating and minifying JavaScript on the
Here's what I've used for concatenating, compressing and caching CSS and JS files: http://gist.github.com/130913
It just requires Yahoo.Yui.Compressor.dll in the bin directory. It doesn't compress at compile time, but the files are cached with a file dependency, so they are only loaded once, until they're changed.
Then I just add this code in the <head>:
<link rel="stylesheet" type="text/css" href="/YuiCompressor.ashx?css=reset,style,etc" />
and this just before the </body>:
<script type="text/javascript" src="/YuiCompressor.ashx?js=main,other,etc"></script>
It's designed to work with multiple files all in the same path but could easily be upgraded to support different paths.
In the appendix of Professional ASP.NET 3.5 Scott Hanselman talks about Packer for .NET. This will integrate with MSBuild and pack javascript files for production deployments etc.