 <p>If you include a <code>\</code> at the start of your line, asp recognizes the whitespace.</p> <pre><code>&lt;%@ Language=JavaScript %&gt; &lt;% var s = "\ \ a"; Response.Write(s.length); %&gt; </code></pre> <p>I wasn't familiar with using the <code>\</code> character to create multiline strings. Neat stuff, but I couldn't find documentation for that. I guess it's just escaping the line break? Do you have a link to a reference?</p> <p><strong>Edit</strong> Additionally, this code:</p> <pre><code>&lt;pre&gt; &lt;% var s = "\ unescaped"; Response.Write(s); Response.Write("\n"); s = "\ \ escaped"; Response.Write(s); %&gt; &lt;/pre&gt; </code></pre> <p>Gives this output:</p> <pre><code>unescaped escaped </code></pre>