Calling C# Code behind code from Java Script
<p>We are using VS2008. We are calling ActiveX shell scrip object which is created as EXE executable, which reads the Pinpad for authentication and returns the result.  This object is called in Javascript in ASPX page.</p>

<p>After getting the result we need to store the information, which we have written in C# code behind page.  </p>

<p>My question is, how we should call the code behind or a WCF service in ASPX java script.</p>

<p>my java script code is as follows:</p>

<pre><code>  function launchExecutable(strdata) {

        try {
            var shellActiveXObject = new ActiveXObject("WScript.Shell");

            shellActiveXObject.Run("c:\\Test\\EBCK.exe " + strdata, 1, true);
        }
        catch (e) {
            alert(e.message);
        }

        try {
            var abc = window.clipboardData.getData('Text');
            // from here we have to call the C# code which is written in CS file or 
            // call a WCF Web service
        }
        catch (e) {
            alert(e.message);
        }
</code></pre>

<p>}</p>
