Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have facing a problem modal popup not rendering after a click.i have checked with debugger event is fired but pop up not raised. please help me.
C#
protected void popup_Click(object sender, EventArgs e)
{
    // Show ModalPopUpExtender.
    ModalPopupExtender1.Show();
    Panel1.Visible = true;

}


ASP.NET
<asp:ScriptManager ID="ScriptManager1" runat="server">

<asp:Button ID="Button1" runat="server" Text=""/>
<ajaxToolKit:ModalPopupExtender ID="ModalPopupExtender1"  runat="server" CancelControlID="btncancel"
TargetControlID="Button1" PopupControlID="Panel1" PopupDragHandleControlID="PopupHeader"
Drag="true" BackgroundCssClass="ModalPopupBG">

<asp:Panel ID="Panel1" Style="display: none" runat="server">
<div class="HellowWorldPopup">
<div class="PopupBody">
<div class="PopupHeader" id="PopupHeader" style="background-color: #009000; margin-removed 0px;<br mode=" hold=" />                    height: 20px; color: white">
    Contact to Dr  <asp:Label
    ID="lblDocname" runat="server"></div>
</div>
<div class="Controls">
<table style="height: 280px; width: 450px; margin-removed 25px;">
<tr>
    <td>
        <asp:Label ID="lblInfo" runat="server">
    </td>
</tr>
<tr>
    <td style="padding-removed 20px; vertical-align: top;">
        Name:
    </td>
    <td style="vertical-align: top;">
        <asp:TextBox ID="txtName" runat="server" Height="23px">
    </td>
</tr>
<tr>
    <td style="padding-removed 20px; vertical-align: top;">
        Mobile No.:
    </td>
    <td style="vertical-align: top;">
        <asp:TextBox ID="txtMobile" runat="server" Height="23px">
    </td>
</tr>
<tr>
    <td style="padding-removed 20px; vertical-align: top;">
        Email Address:
    </td>
    <td style="vertical-align: top;">
        <asp:TextBox ID="txtAddress" runat="server" Height="23px">
    </td>
</tr>
<tr>
    <td style="padding-removed 20px; vertical-align: top;">
        Query:
    </td>
    <td style="vertical-align: top;">
        <asp:TextBox ID="txtQuery" runat="server" TextMode="MultiLine">
    </td>
</tr>
<tr>
    <td style="padding-removed 90px; vertical-align: top;">
        <asp:Button ID="btnSend" runat="server" Text="Send Now" OnClick="btnSend_Click" Style="background-color: #195905;
            color: White; vertical-align: top; height: 23px; width: 70px;" />
    </td>
    <td style="margin-removed 25px;">
        <asp:Button ID="btncancel" runat="server" Text="Cancel" Style="background-color: #195905;
            vertical-align: top; color: White; height: 23px; width: 70px;" />
    </td>
</tr>
</table>
</div></div>
Posted
v3
Comments
Tom Marvolo Riddle 11-Oct-13 2:32am    
Check Pop up blocker in browser is turned off.
Mohd Arif Khan 11-Oct-13 2:49am    
it is on.
Tom Marvolo Riddle 11-Oct-13 3:52am    
Turn off the pop up blocker In IE.Uncheck the Block Pop-Up Windows in Mozilla
bbirajdar 11-Oct-13 4:35am    
You have not assigned the OkControlID to the extender. Assign it and it will work

1 solution

i have seen that you have added <asp:scriptmanager id="ScriptManager1" runat="server" xmlns:asp="#unknown">

in your page, but model popup extender expect Toolkit Script Manager to execute.

so remove asp:ScriptManager and add toolkit script manager which is inside "Ajax Contol Toolkit Library".
check this one your problem will be resolve.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900