Call WCF From CodeBehind Asp.net
<p>I am making wcf calls and getting back data in my application via this javascript code..</p>

<pre><code>function setCurrentResponseValue(response) {

    var applicationData = null;

    $.ajax({
        type: "POST",
        url: "ClientService.svc/REST/SetCurrentResponseValue",
        contentType: "application/json; charset=utf-8",
        data: JSON.stringify({ response: response }),
        dataType: "json",
        async: false,
        success: function (msg) {

            applicationData = msg;

        },
        error: 'An Error'
    });

    return applicationData;

}
</code></pre>

<p>I need to set session variables my svc file uses from C# code behind. How do I call a method in my svc file from code behind instead the ajax call above?</p>
