Nitin Daphale 0 Junior Poster in Training

I have a button in popup panel which am showing using Ajax PopupExtender.

Now I want to call button_click server side code on pressing the button.
But it's not happening when I press it.


Anybody can suggest any idea?

<asp:UpdatePanel runat="server" ID="UpdatePanel1">
<ContentTemplate>

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<asp:HyperLink ID="HyperLink1" runat="server" onmouseover="MouseHover();" Font-Underline="True"
            ForeColor="Blue">
<b>Mouse Over Here to Open PopUp</b>
        </asp:HyperLink>
        to open pop up
        <AJX:ModalPopupExtender runat="server" BehaviorID="modelPopupExtender1" TargetControlID="HyperLink1"
            PopupControlID="popUpPanel" OkControlID="btnOk" BackgroundCssClass="modalBackground">
        </AJX:ModalPopupExtender>
        <asp:Panel ID="popUpPanel" runat="server"  BackColor="Aqua">
          <div class="inner">         
             
           <asp:DropDownList runat="server" ID="ddl_items">             </asp:DropDownList>               
   
                    <asp:Button ID="btnOk" runat="server" Text="Ok" onclick="btnOk_Click" />
                    <asp:LinkButton ID="LinkButton1" runat="server"   />
               
            </div>
        </asp:Panel>
    
      </ContentTemplate>
        </asp:UpdatePanel> 


 protected void btnOk_Click(object sender, EventArgs e)
    {
        DBManager dbMangr = new DBManager();

        System.Data.DataTable dt = new System.Data.DataTable();

        string query = "select quotationid  ID ,narration  Text from quotation";
            

        dbMangr.FillDatatable(query,dt);

        ddl_items.DataSource = dt;

        ddl_items.DataBind();

    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.