Call C# method from another page in javascript function with jQuery
<p>In GridViewData.aspx.cs I have a method I want to call inside a javacsript function.</p>

<pre><code>//This simple example method is from GridViewData.aspx.cs
private int ValidateNameUpdateable()
{
    return 22;   

}
</code></pre>

<p>I want to call this function from Javascript in default.aspx</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function validateForm() 
    {            

        if (ValidateNameUpdateable==22) 
        {
            alert("Name is not updateable, the party already started.");
             return false;
        }

        //if all is good let it update
        UpdateInsertData()
    }
&lt;/script&gt; 
</code></pre>

<p>Now hears the kicker, I am mostly using jqUery as UpdateInsertData() is a jquery Call and works fine. How do I use ValidateNameUpdateable to call jQuery to return the value from the c# method. . I believe this issue is with my jQuery Call as its just posting and I need to do a $.get or something?</p>

<pre><code>function ValidateNameUpdateable() 
{
    $(document).ready(function () 
    {
        $.post("GridViewData.aspx")           
    });
}
</code></pre>
