title: OnClientClick OnClick
body: <p>In my asp page, I take a screenshot of the client's desktop with an applet and ask them to send it to the server with a single click of a <code>LinkButton</code>. I use <code>runApplet()</code> function to call my applet to capture the screen and assign the strings value to a hidden value. (picture is stored as base64 string) Until here, everything works perfect! However, SendLinkButton_Click doesnt seem to be executing!</p>
  
  <p><strong>This is my link button.</strong></p>
  
  <pre><code>&lt;asp:LinkButton ID="SendLinkButton" 
            OnClientClick="runApplet(); return false;"
            OnClick="SendLinkButton_Click" 
            Visible="false" 
            CssClass="portal-arrow portal-button"
            runat="server"&gt;Send&lt;/asp:LinkButton&gt;
  </code></pre>
  
  <p><strong>This is my Javascript function</strong></p>
  
  <pre><code>   function runApplet() {
  
        var msg = document.capture.capture();
        var hiddenControl = '&lt;%= inpHide.ClientID %&gt;';
        document.getElementById(hiddenControl).value = msg;
     }
  </code></pre>
  
  <p><strong>and this is what's inside of SendLinkButton_Click</strong> </p>
  
  <pre><code>protected void SendLinkButton_Click(object sender, EventArgs e)
  {
      Server.Transfer("Preview.aspx", true);
  }
  </code></pre>
  
  <p>when I put the javascript function to a LinkButton's OnClientClick, and execute this "SendLinkButton_Click" with another LinkButton. It works perfect! But I want them to work with just one click!</p>
  
  <p>Please help!</p>