Need help to call the java script from c#
<p>I need to format the value as currency like ($1,000), i am having the code with me but i need to know how to call the java script from c#</p>

<p><strong>aspx.cs page</strong> (code page</p>

<pre><code>x= 2345
textbox1.text = x.ToString();// i need the format currency here
</code></pre>

<p><strong>JavaScript</strong> </p>

<pre><code>function formatCurrency(num)
 {
    num = num.toString().replace(/\$|\,/g,'');
    if(isNaN(num))
    num = "0";
    sign = (num == (num = Math.abs(num)));
    num = Math.floor(num*100+0.50000000001);
    cents = num%100;
    num = Math.floor(num/100).toString();
    if(cents&lt;10)
    cents = "0" + cents;
    for (var i = 0; i &lt; Math.floor((num.length-(1+i))/3); i++)
    num = num.substring(0,num.length-(4*i+3))+','+
    num.substring(num.length-(4*i+3));
    return (((sign)?'':'-') + '$' + num + '.' + cents);
}
</code></pre>

<p>Please help me how to call the format currency from c# file , I need to display the format value in text box.</p>
