Display modal popup without page loading using asp.net and jquery
<p>As per <strong>Jitendra Tiwari</strong> suggestion i have changed my code and it works fine, it displaying popup but parallely page is loading after loading page popup will not display Here is the code i have changed 
 <code>&lt;obout:GridTemplate runat="server" ID="duplicate"&gt;
    &lt;Template&gt;
       &lt;asp:ImageButton ID="lnkbtnDuplicate" runat="server" OnClick="lnkbtnDuplicate_Click" AlternateText="Duplicate"                                    CssClass='&lt;%#Container.DataItem["schedule1"]%&gt;' OnClientClick="OpenPopup();"&gt;&lt;/asp:ImageButton&gt;
    &lt;/Template&gt;
&lt;/obout:GridTemplate&gt;</code>
and in dialog box have to display message that code is
 <code>&lt;div&gt;
            &lt;div id="popupdiv" title="Basic modal dialog"  class="dialog"&gt;
                Are you sure you want ready to duplicate?
            &lt;div class="footer" style="padding: 8px;"&gt;
                &lt;asp:Button ID="Button2" runat="server" Text="Proceed" CssClass="yes" OnClick="btnOkay_Click" /&gt;
                &lt;asp:Button ID="Button3" runat="server" Text="Cancel" CssClass="no" OnClick="btnCancel1_Click" /&gt;
                &lt;asp:Button ID="btnOkay" runat="server" Text="Yes" CssClass="yes hide" /&gt;
                &lt;asp:Button ID="btnCancel1" runat="server" Text="Cancel" CssClass="no hide" /&gt;
            &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;</code>
Jquery code is </p>

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

         $("#popupdiv").dialog({
             autoOpen: false,
                title: "Dualistic e-Filing",
                width: 430,
                height: 250,
                modal: true,
                buttons: {
                    Close: function () {
                        $(this).dialog('close');
                    }
                }
            });              
     })
     function OpenPopup() {
         $("#popupdiv").dialog("open");
         return false;
     }
&lt;/script&gt;
</code></pre>

<p>my back-end code is </p>

<pre><code> protected void lnkbtnDuplicate_Click(object sender, ImageClickEventArgs e)
    {
        try
        {

            Hashtable selectedRec = (Hashtable)ogridForms.SelectedRecords[0];
            Session["formkey_temp"] = Convert.ToString(selectedRec["form_key"].ToString());
            Session["bussiness_temp"] = Convert.ToString(selectedRec["business_key"]);
            Session["filling_temp"] = Convert.ToString(selectedRec["filing_type"]).ToUpper();
        }
        catch { }
    }
    protected void btnOkay_Click(object sender, EventArgs e)
    {
        try
        {
            BAL_F2290 objFormKeys = new BAL_F2290();
            var s = objFormKeys.Duplicate(Session["formkey_temp"].ToString());
            Session["FORM_KEY"] = Convert.ToString(s);
            Session["BUSINESS_KEY"] = Convert.ToString(Session["bussiness_temp"]);
            Session["FILING_TYPE"] = Convert.ToString(Session["filling_temp"]).ToUpper();
            Response.Redirect("TaxPeriod.aspx?dup=1");
        }
        catch (Exception ex)
        {
            string a = ex.Message;
        }
    }
    protected void btnCancel1_Click(object sender, EventArgs e)
    {

        Session["formkey_temp"] = null;
        Session["bussiness_temp"] = null;
        Session["filling_temp"] = null;
    }
</code></pre>