modalpopup扩展器未显示

modalpopup扩展器未显示

本文介绍了modalpopup扩展器未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了一个modalpopup扩展器来显示其中的dropdowmlist项.但是单击该按钮后,什么都不会弹出..需要帮助..
Asp:

I have set a modalpopup extender to display the item of a dropdowmlist in it.but upon clicking the button nothing is poping up..need help..
Asp:

<asp:Panel ID="Panel1" runat="server" CssClass="HellowWorldPopup" Width="320px" Style="display:none">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
        <asp:Button ID="Button1" runat="server" Style="display:none" />
        <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server"

           TargetControlID="Button1" PopupControlID="Panel1" CancelControlID="CancelButton">
        </asp:ModalPopupExtender>
        <asp:Label ID="Label2" runat="server" />
        <asp:Button ID="OkButton" runat="server" Text="Ok" CausesValidation="true" />&nbsp;
           <asp:Button ID="CancelButton" runat="server" Text="Cancel" CausesValidation="false" />
</ContentTemplate>
</asp:UpdatePanel>
    </asp:Panel>


5.在下一页的下一页,放置一个Button和一个TextBox,如下所示:


5.Next the next page, placed a Button and a TextBox like this:

<asp:TextBox ID="MyTextBox" runat="server" />
<asp:Button ID="MyButton" runat="server" Text="Popup" OnClick="MyButton_OnClick" />


6,在页面后面的代码中,我放置了MyButton的处理程序:


6.and in the code behind for the page, i placed the handler for MyButton:

protected void MyButton_OnClick(object sender, EventArgs e)
{
     Label1.Text = MyTextBox.Text;
     UpdatePanel1.Update();
     ModalPopupExtender1.Show();
}

推荐答案

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>


2)添加


2)Add

<asp:scriptmanager id="src" runat="server"></asp:scriptmanager>


在表单标签中,然后尝试

3)添加ajaxcontroltoolkit参考dll


inside form tag and then try

3)Add ajaxcontroltoolkit reference dll


这篇关于modalpopup扩展器未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-30 15:55