Can some one tell how can I register the jquery function on button click which is in master page
<p>Hi all I am having a master page where I am having a button, where I have written some script as follows</p>

<pre><code>&lt;script type="text/javascript"&gt;

    $(document).ready(function () {
        $("#btnMaster").click(f2());
    });
    function f2() {
        if (isDirty == 1) {
            jConfirm('Can you confirm this?', 'Confirmation Dialog', function (r) {
                if (r == true) {
                    document.location.href = "http://localhost:2758/Waitingweb/Status.aspx";

                }
                else
                    return false;

            });
            //return false;
            return false;
        }
        else {

        }
    }
&lt;/script&gt;
</code></pre>

<p>In my master page load  I write as follows</p>

<pre><code>if (!IsPostBack)
    {
        //Page.ClientScript.RegisterStartupScript(Page.GetType(), "PostbackClick", "$('#btnMaster').click();", true);
        Page.ClientScript.RegisterStartupScript(this.GetType(), "click", "f2();", true);
        Page.ClientScript.RegisterStartupScript(this.GetType(), "myScript", "&lt;script type=\"text/JavaScript\" language=\"javascript\"&gt;f2();&lt;/script&gt;");
    }
</code></pre>

<p>But I am unable to fire the required when handling the button from content page, so can some one help me regarding this</p>
