0

I am working on a project and i want to popup a panel on a click of a button but its not working what could be the reason behind ..as i tried after updating the ajax toolkit again its not working.

Please give me a solution for that. Here is what I have tried:

      <form id="form1" runat="server">
  <div>
     <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
     <asp:Button ID="btnShowPopupisbn" runat="server" style="display:none" />
     <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnShowPopupisbn" PopupControlID="pnl_isbn" CancelControlID="btnCancel" BackgroundCssClass="modalBackground" PopupDragHandleControlID="pnlpopup"></asp:ModalPopupExtender>
     <asp:Panel ID="pnl_isbn" runat="server" Visible="False" width="400px"CssClass="color">
     <asp:Label ID="lbl_isbn" runat="server" Text="ISBN " ForeColor="Black"></asp:Label>
     <asp:TextBox ID="txt_isbn" runat="server" ValidationGroup="b" AutoPostBack="true"></asp:TextBox>
     <asp:Label ID="lbl_booktwoid" runat="server" ForeColor="Red" Text="booktwoid" Visible="False"></asp:Label>
     <asp:Label ID="lbl_conditionisbn" runat="server" ForeColor="Black" Text="Condition"></asp:Label>
     <asp:DropDownList ID="drp_con" runat="server" Width="120px" ValidationGroup="b"></asp:DropDownList>
     <asp:Button ID="btn_isbnnumber" runat="server" Text="Add ISBN" CssClass="blue button" ValidationGroup="b"/></asp:Panel>
</div>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button"/> 
</form>

cs code on button click:

 protected void Button1_Click(object sender, EventArgs e)
{
    pnl_isbn.Visible = true;
    ModalPopupExtender1.Show();

}
3
  • btnShowPopupisbn where its
    – Amit Singh
    May 2, 2013 at 10:39
  • why display:none in btnShowPopupisbn? May 2, 2013 at 10:45
  • yor button display is null so from where you calling show popup
    – Amit Singh
    May 2, 2013 at 10:53

1 Answer 1

0

You have missed a closing quote PopupControlID="pnl_isbn".Please check it out.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.