Store the string returned by an ASP.NET helper into a javascript var: SyntaxError
<p>What I want to do is store the string returned by this ASP.NET helper into a javascript var.</p>

<p>My code:</p>

<pre><code>    function doSomething(id){
     var htmlString = '@Html.TextArea("test", new { @rows = "1" })';
    }
</code></pre>

<p>The generated javascript along with the error in chrome:</p>

<pre><code> var htmlString = '&lt;textarea cols="20" id="test" name="test" rows="1"&gt;
 Uncaught SyntaxError: Unexpected token ILLEGAL
 &lt;/textarea&gt;';
</code></pre>
