And then I had a thought. VB in Visual Studio 2008 has a built-in XML parser. So all I have to do is start typing xml and the IDE will recognize it. So why not put the Javascript inside a CDATA tag in some XML and let VB take care of the rest?
It works! Here's an example...
Dim script = <xml>
<![CDATA[
alert("Hello World!");
]]>
</xml>
Response.Write(script.Value)
This makes it so easy to write Javascript in a code-behind, especially when you have a lot of Javascript to write.