Passing variables from cs to javascript
<p>i'm my code behind of my web application, i have this method associated to the event click</p>

<pre><code>protected void Button1_Click(object sender, EventArgs e)
{

      string pagFinal = "this is a test";

      ClientScript.RegisterClientScriptBlock(this.GetType(), "variable", "&lt;script language=javascript&gt; var direction = &lt;%=pagFinal%&gt; &lt;/script&gt;");

}
</code></pre>

<p>but when i see the html generated doesn't appear's the javascript why i'm doing wrong. Thanks</p>
