Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The code runs without error but modal popup is not visible. How to make it function?

XML
<asp:UpdatePanel ID="gt" runat="server" UpdateMode="Conditional">
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="BtnEnquirySend" />
    </Triggers>
    <ContentTemplate>
    <asp:Button ID="BtnEnquirySend" runat="server"  Text="Send" style=" left:910px; top:845px; position:absolute;" OnClick="BtnSend_Click"  />
    <asp:Panel ID="Panel11" runat="server" style=" height:300px; width:200px; margin-left:170px; margin-top:400px"></asp:Panel>
    <asp:ModalPopupExtender ID="MPE" runat="server"
    TargetControlID="BtnEnquirySend"
    PopupControlID="Panel11"
    BackgroundCssClass="modalBackground"
    DropShadow="true"
    OkControlID="OkButton"
    OnOkScript="onOk()"
    CancelControlID="CancelButton"
    PopupDragHandleControlID="Panel11" >
    </asp:ModalPopupExtender>
    </ContentTemplate>
    </asp:UpdatePanel>


C#
protected void BtnSend_Click(object sender, EventArgs e)
    {
        MPE.Show();
    }
Posted
Comments
Tom Marvolo Riddle 26-Feb-14 23:27pm    
Try:
Updatemode="Always".Try it and let me know
S.Rajendran from Coimbatore 27-Feb-14 10:47am    
Always is not working
JoCodes 26-Feb-14 23:37pm    
Add event for the Button in PostBackTrigger like EventName="Click" ,Also,Can you add and try Property of modalpopup to BehaviorID="popup" if not working
S.Rajendran from Coimbatore 27-Feb-14 10:53am    
EventName="Click" is not working.
behaviourId="popup" is also not working!

Aravindba 27-Feb-14 0:59am    
<asp:ModalPopupExtender ID="MPE" runat="server"
TargetControlID="BtnEnquirySend"
PopupControlID="Panel11"
BackgroundCssClass="modalBackground"
DropShadow="true"
OkControlID="OkButton"
OnOkScript="onOk()"
CancelControlID="CancelButton"
PopupDragHandleControlID="Panel11" >


try to move outside of updatepanel above ModalPopupExtender block

1 solution

Try this:
C
   <asp:UpdatePanel ID="gt" runat="server" UpdateMode="Conditional">
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="BtnEnquirySend" />
    </Triggers>
    <ContentTemplate>
    <asp:Button ID="BtnEnquirySend" runat="server"  Text="Send" style=" left:910px; top:845px; position:absolute;" OnClick="BtnSend_Click"  />
    <asp:Panel ID="Panel11" runat="server" style=" height:300px; width:200px; margin-left:170px; margin-top:400px">
        <asp:Label ID="Label3" runat="server" Text="Check"></asp:Label>
//label included to check
    </asp:Panel>      
    <asp:ModalPopupExtender ID="MPE" runat="server"
    TargetControlID="BtnEnquirySend"
    PopupControlID="Panel11"
    BackgroundCssClass="modalBackground"
    DropShadow="true">
    </asp:ModalPopupExtender>
    </ContentTemplate>
    </asp:UpdatePanel>


The panel has no values.That's why it looks like not showing.
 
Share this answer
 
v2
Comments
S.Rajendran from Coimbatore 28-Feb-14 4:19am    
Thanks. It helped me.
Tom Marvolo Riddle 28-Feb-14 4:23am    
You're most welcome

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