模型Popup扩展程序无法正常工作

时间:2013-05-02 10:37:47

标签: asp.net mysql ajax

我正在研究一个项目,我想点击一个按钮弹出一个面板,但它不起作用可能是背后的原因..我在再次更新ajax工具包后尝试不起作用。

请给我一个解决方案。这是我尝试过的:

      <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代码:

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

}

1 个答案:

答案 0 :(得分:0)

你错过了收盘报价PopupControlID =&#34; pnl_isbn&#34;。请查看。