How to call javascript function from code-behind
<p>I wrote a javascript with a asp.net page.</p>

<p>In Asp.net Page</p>

<pre><code>&lt;HTML&gt; &lt;HEAD&gt;
     &lt;script type="text/javascript"&gt;
      function Myfunction(){
          document.getElementId('MyText').value="hi";
      }
      &lt;/script&gt;
&lt;/HEAD&gt; &lt;BODY&gt;
&lt;input type="text" id="MyText" runat="server" /&gt; &lt;/BODY&gt;
</code></pre>

<p>In Code-behind</p>

<pre><code> Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
  Handles Me.Load
       If Session("My")= "Hi" Then
          I want to call "Myfunction" javascript function
       End If 
 End Sub
</code></pre>

<p>How can I do?</p>
