Send current page class object as parameter in Ajax webmethod call
<p>I am having the user control where i am calling the webmethod in the parent of the user control as below (in usercontrol.ascx)</p>

<pre><code>    $.ajax({
        type: "POST",
        url: "parent.aspx/testmethod",
        data: "{}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: OnSuccess,
        error: OnError
    }); 
</code></pre>

<p>and the web method declaration in the parent.aspx file is shown below</p>

<pre><code>&lt;WebMethod(EnableSession:=True)&gt; _
Public Shared Function testmethod() As Boolean
    Return False        
End Function
</code></pre>

<p>now I need to pass the usercontrol object in the <code>data:</code> so that I can make use of the public method available in the usercontrol.vb inside the <code>testmethod()</code>.</p>

<p>How can we pass usercontrol object in the Ajax webmethod call?</p>

<p>The Problem is testMethod() is a Shared function so calling the usercontrol public methods from the shared(static) method is little tricky  .</p>
