asp.net button Postback using jQuery
<p>I'm in need of doing a post back for an asp.net button inside jQuery modal dialog. The markup I have is something like this</p>

<pre><code> &lt;div id="content"&gt;
        &lt;h1&gt;
            Join Our Community&lt;/h1&gt;`enter code here`
        &lt;hr /&gt;
       Some Context..
        &lt;br /&gt;
        &lt;br /&gt;
         Some Context..
        &lt;hr /&gt;
        &lt;br /&gt;
        &lt;!-- Modal Dialog --&gt;
        &lt;a id="tos" href="#serviceterms" title="You must agree with our tems of service."&gt;Click
            HERE to Agree to our Terms &lt;/a&gt;
        &lt;div style="display: none"&gt;
            &lt;div id="serviceterms" style="width: 440px; height: 250px; overflow: auto;"&gt;
                Lorem ipsum dolor sit amet, consectetur adipiscing elit.
                &lt;br /&gt;
                &lt;br /&gt;
       Some Context..
                &lt;br /&gt;
                &lt;br /&gt;
                &lt;hr /&gt;
                &lt;input type="button" value="Yes" onclick="ToS_Agree()" /&gt;&amp;nbsp;&amp;nbsp;
                &lt;input type="button" value="No" onclick="ToS_NotAgree()" /&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;asp:Button ID="HiddenButton" runat="server" Text="Button" OnClick="Button1_Click" /&gt;
        &lt;asp:Button ID="SubmitButton" runat="server" Text="Submit Form" Enabled="False" ClientIDMode="Static"
            OnClick="SubmitButton_Click" /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &lt;asp:Label ID="LabelResult" runat="server" Text=""&gt;&lt;/asp:Label&gt;
</code></pre>

<p>In the jQuery Section, the code is something like </p>

<pre><code>$(document).ready(function () {

    $("#tos").fancybox({
        'titlePosition': 'inside',
        'modal': 'true',enter code here
        'transitionIn': 'none',
        'transitionOut': 'none'
    });
});

function ToS_Agree() {
    $('#SubmitButton').removeAttr('disabled');
    __doPostBack('&lt;%# HiddenButton.ClientID %&gt;', '')

}

function ToS_NotAgree() {
    $('#SubmitButton').attr('disabled', 'disabled');
    $.fancybox.close();
}       
</code></pre>

<p><strong>Problem:</strong> When I hit the yes button in the modal dialog, it is posting back correctly. But it directs me to the page_load event body and doesn't go to Button1_Click body. Please help me here. I personally believe that there must be a way to get my desired event body using jQuery. Thanks in Advance.</p>
