How to pass value of C# variable to javascript?
<p>In button click event I am writing this code.(code behind).I know button click event</p>

<pre><code>protected void button_click()
{         
    string s1 = "Computer"; 
    StringBuilder sb = new StringBuilder(); 
    sb.Append(@"&lt;script language='javascript'&gt;"); 
    sb.Append("document.write('&lt;table&gt;&lt;tbody&gt;')";); 
   sb.Append("document.write('&lt;tr&gt;&lt;td&gt;Information&lt;/td&gt;&lt;/tr&gt;')";); 
    if(s1 == "Computer" ) 
   {
     sb.Append("&lt;tr&gt;&lt;td&gt;s1&lt;/td&gt;&lt;/tr&gt;"); 
   }
   sb.Append("document.write('&lt;/tbody&gt;&lt;/table&gt;')";);
   sb.Append(@"&lt;/script&gt;"); 

}
</code></pre>

<p>It is working but I want value of s1 not s1.I know javascript is a client side programing.I wrote this function in button click event.How can pass value of s1 that is computer to table's cell</p>
