calling javascript function from .net codebehind with a value
<p>I am trying to call a javascript function from asp.net codebehind using onclientclick for a linkbutton. Code is like this:</p>

<pre><code>string x = "redirecttoimagepage"+"("+ y+")";//y has an int value i need and it varies
lnkimagepage.OnClientClick = x;
</code></pre>

<p>i need to use the value y in the javascript function for using. </p>

<pre><code> function redirecttoimagepage(variable)
{
var strURL = "Subpages.aspx?tabID="+variable;
window.open(strURL,"_blank");
return true;
}
</code></pre>

<p>Right now, with the code i have shared, it doesnt do anything. After the link is clicked, it stays in the same page. What am i doing wrong? Appreciate all your help guys. Thanks a lot!</p>
