i'm my code behind of my web application, i have this method associated to the event click
protected void Button1_Click(object sender, EventArgs e)
{
string pagFinal = "this is a test";
ClientScript.RegisterClientScriptBlock(this.GetType(), "variable", "<script language=javascript> var direction = <%=pagFinal%> </script>");
}
but when i see the html generated doesn't appear's the javascript why i'm doing wrong. Thanks