Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 638
  • Last Modified:

AJAX Modal popup from link inside Repeater

I am trying to launch a modal popup from a link displayed by a Repeater.  

When I click the link, the screen dims by calling the css from the Modal popup extender ID tag, but the panel is never displayed.
<asp:Panel ID="Panel3" runat="server" CssClass="modalPopup" >
          
            <asp:Button ID="Button1" runat="server" Text="Button" />
            <asp:TextBox ID="TextBox7" runat="server">   </asp:TextBox>
            <br />
</asp:Panel>
             

  <asp:Repeater ID="rptrExample" runat="server" >
        <HeaderTemplate><ul id='rp'></HeaderTemplate>
     
 
        <ItemTemplate>
      <cc1:ModalPopupExtender ID="Panel3_ModalPopupExtender" runat="server" 
           TargetControlID="replyLink" PopupControlID = "Panel3" DropShadow ="true"   CancelControlID = "Button1"  BackgroundCssClass="modalBackground">
        </cc1:ModalPopupExtender>
                  
               
        
            <li><%# DataBinder.Eval(Container.DataItem, "P1") %>
            ,
            <%# DataBinder.Eval(Container.DataItem, "Age") %>
            
            <%# DataBinder.Eval(Container.DataItem, "code") %>
            
            <br />
            <br />
            "
            <%# DataBinder.Eval(Container.DataItem, "Body") %>
            "

            
              
              <asp:LinkButton ID="replyLink" runat="server">Reply</asp:LinkButton>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:LinkButton ID="commentLink" runat="server">Comment</asp:LinkButton>
            </li>
            
        </ItemTemplate>
        <FooterTemplate>
            </ul>
        </FooterTemplate>
    </asp:Repeater>

Open in new window

0
cmushaun
Asked:
cmushaun
1 Solution
 
Kumaraswamy RCommented:
0
 
cmushaunAuthor Commented:
I've seen this but still having this issue
0
 
rajeeshmcaCommented:
Hi

Give the Panel also within the Repeater control
 like


             

  <asp:Repeater ID="rptrExample" runat="server" >
        <HeaderTemplate><ul id='rp'></HeaderTemplate>
     
 
        <ItemTemplate>
    <asp:Panel ID="Panel3" runat="server" CssClass="modalPopup" >
         
            <asp:Button ID="Button1" runat="server" Text="Button" />
            <asp:TextBox ID="TextBox7" runat="server">   </asp:TextBox>
            <br />
</asp:Panel>
      <cc1:ModalPopupExtender ID="Panel3_ModalPopupExtender" runat="server"
           TargetControlID="replyLink" PopupControlID = "Panel3" DropShadow ="true"   CancelControlID = "Button1"  BackgroundCssClass="modalBackground">
        </cc1:ModalPopupExtender>
                 
               
       
            <li><%# DataBinder.Eval(Container.DataItem, "P1") %>
            ,
            <%# DataBinder.Eval(Container.DataItem, "Age") %>
           
            <%# DataBinder.Eval(Container.DataItem, "code") %>
           
            <br />
            <br />
            "
            <%# DataBinder.Eval(Container.DataItem, "Body") %>
            "

           
             
              <asp:LinkButton ID="replyLink" runat="server">Reply</asp:LinkButton>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:LinkButton ID="commentLink" runat="server">Comment</asp:LinkButton>
            </li>
           
        </ItemTemplate>
        <FooterTemplate>
            </ul>
        </FooterTemplate>
    </asp:Repeater>
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now