Calling Javascript Function in C# not working properly
<p>I wanna call a javascript function in c sharp code.
i wanna hide the specific Li tag whose id is c sharp variable"li_name".
For this  i am calling a javascript function. </p>

<p>Cs Code:</p>

<pre><code>  li_name = DSRolePermission.Tables[0].Rows[k]["MENUNAME"].ToString();
  StringBuilder script = new StringBuilder();

  script.Append("&lt;script type=\"text/javascript\"&gt;");

  script.Append("li_visibility('" + li_name + "')");

  script.Append("&lt;/script&gt;");

  Page.ClientScript.RegisterClientScriptBlock(typeof(object), "JavaScriptBlock", script.ToString());
</code></pre>

<p>JS code:</p>

<pre><code> &lt;script type="text/javascript"&gt;
           function li_visibility('&lt;%=li_name %&gt;') {
document.getElementById('&lt;%=li_name %&gt;').style.display = 'hidden';

      }      
&lt;/script&gt;
</code></pre>

<p>But this code is not working properly.</p>
