Question

I am doing research to the Modalpopupextender from the Ajax Toolkit.

This code doesn't work, it doesn't open the pop-up. The only thing what happens when I click on the button is: Refreshing the page.

What am I doing wrong? Also tried this with an Updatepanel... Did 3 hours of research before posting this question, please don't blame it on me...

I also used the Toolkitscriptmanager, but that didn't solve it.

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

<asp:Button ID="btnTest" runat="server" Text="Button" />

<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnTest" PopupControlID="Panel"></asp:ModalPopupExtender>

<asp:Panel ID="Panel" runat="server">
    <h1>Hello World!</h1>
</asp:Panel>

No correct solution

OTHER TIPS

Use PostBackTrigger for the button and then check it out .:)

Example:

<asp:UpdatePanel ID="updatePanel1" runat="server">
    <ContentTemplate>
        <asp:Button ID="btnTest" runat="server" Text="Button" />
        <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server"           TargetControlID="btnTest" PopupControlID="Panel"></asp:ModalPopupExtender>
        <asp:Panel ID="Panel" runat="server">
            <h1>Hello World!</h1>
        </asp:Panel>
    </ContentTemplate>
    <Triggers>
        <asp:PostBackTrigger ControlID="btnTest"/>
    </Triggers>
</asp:UpdatePanel>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top