C# – ModalPopupExtender Error

ajaxc++modalpopupextendervisual-studio-2008

i want to popup ModalPopupExtender in button click, but when i run my code and click on the button then ModalPopupExtender is not popup even i used all the required AjaxControlToolkit references for this

my code is following :

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div>
    <asp:Panel ID="Panel1" runat="server" BackColor="#CC3300">
    hello...
    </asp:Panel>
    <asp:Button ID="Button1" runat="server" Text="click here" />

    <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panel1" TargetControlID="Button1">
    </asp:ModalPopupExtender>
</div>
</form>

i am using the visual studio 2008 Pro., .Net Framework 3.5 and for Ajax i used AjaxControlToolkit.dll(3.5.60919.0)

sir, plz give me solution for this..

Best Solution

it can be your tags, try ajaxToolkit instead of asp tag

<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" PopupControlID="Panel1" TargetControlID="Button1">
</ajaxToolkit:ModalPopupExtender>