Differences between Script & Code behind?
<p>Please let me ask something. I just confused for what is the difference of javascript, JQuery and code behind attributes.
for example : 
ASPX</p>

<pre><code>&lt;tbody id="toggleSup" runat="server"&gt;
</code></pre>

<p>C#</p>

<pre><code>toggleSup.Visible = false;
</code></pre>

<p>--------------------------------------- OR ---------------------------</p>

<p>C#</p>

<pre><code>CallScript((string)(Session["toggle"])); 

private void CallScript(string str)
    {
        string scriptx = "&lt;SCRIPT LANGUAGE='javascript'&gt;";
        scriptx += "toggle('" + str + "');";
        scriptx += "&lt;/script&gt;";

        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "scriptx", scriptx, false);
    }
</code></pre>

<p>Script</p>

<pre><code>function toggle(para1) {           
        if (para1 == 0) {
            $('#toggleSup').hide();
        }
        else {
            $('#togglePO').hide();
        }
    }
</code></pre>

<p>for these two difference things, most of the developers use script. Why? Actually C# code is only one row. different thing is if I use script, no need to use runat="server" but if I used code behind, need to use runat = "server". So I think there may be definately have advantages. Please explain me, if possible...</p>

<p>Thanks</p>
