Access Javascript function on Default.aspx from web Control
<p>I have some ajax fucntions on my default.aspx that I use for saving data to my db. I have the form on my web control. When I try calling the function from my button which resides on the web control. I get an error.</p>

<p>I need to call that function from my registerform.ascx. How do I do that from within the registerform code behind?</p>

<pre><code>function ShowAvailability() {
$.ajax({
    type: "POST",
    url: "Default.aspx/CheckEmail",
    data: '{usermail: "' + $("#&lt;%=subs_email.ClientID%&gt;")[0].value + '" }',
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: OnSuccess,
    failure: function(response) {
        alert(response);
    }
});
</code></pre>
