Click here to Skip to main content
12,501,082 members (42,940 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
I have taken repeater control..inside that one linkbutton and on that linkbutton i want to show modalpopup...but event doesnt fire on linkbutton click...

//source code

<asp:Repeater ID="ReptJobPosting" runat="server">
                      <ItemTemplate>
                         <table >
                             <tr>
                             <td><b>Job Title:</b></td>
                             <td>
                                <asp:Label ID="Label1" runat="server" Text='<%#Eval("JOB_TITLE") %>'></asp:Label>
                            </td>
                            </tr>
                             <tr>
                            <td><b>Posted Date:</b></td>
                            <td>
                                <asp:Label ID="Label2" runat="server" Text='<%#Eval("JOB_DATE") %>'>
<cc1:ModalPopupExtender PopupControlID="Panel1" TargetControlID="LnkbtnViewmore" ID="Mpecopening" runat="server" >
                           </cc1:ModalPopupExtender>









<asp:Panel ID="Panel1" runat="server">
                                            <div style="width:350px; background-color:#ffffff; text-align:left; padding:10px; border-radius:5px; border:5px solid #d3d3d2;">
 

 
                                  <h2>
                                      <asp:Label ID="LblATjobdtl1" runat="server" ></asp:Label>
 
                                  </h2>
                                  <p class="popupp">
                                      <asp:Label ID="LblATjobdsc1" runat="server" ></asp:Label>
 
                                  </p>
 
                                  <div class="popupfloat" >
                                  Experiance:
                                        <span class="redcolor">
                                      <asp:Label ID="LblATexp1" runat="server" >
                                      </asp:Label>
                                        </span>
                                  </div>
 
                                  <div class="popupfloat" >
                                  Salary:
                                        <span class="redcolor" >
                                      <asp:Label ID="LblATsal1" runat="server" >
                                      </asp:Label>
                                  </span>
                                  </div>
                                  <div class="clear"></div>
 
                                  <div class="popupdate">
                                  Post Date: <span class="datecolor">
                                      <asp:Label ID="LblATpdate1" runat="server" >
                                      </asp:Label>
                                  </span>
                                  </div>
 
                            <a href="" class="close"><span>Close</span></span></a>
 
                          <a href="#links" class="lightbox">Back to links</a>
 
                                      <asp:Button ID="Btnok" runat="server" Text="Button" />
 
                                            </div>
                                        </asp:Panel>
Posted 23-Jan-13 0:42am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

You can not evoke onclick event in repetaer or any data controls

check this..

http://msdn.microsoft.com/en-us/library/df6hth3s(v=vs.100).aspx[^]

OR

.aspx
------------------
<asp:Repeater ID="Repeater1" runat="server">
    <ItemTemplate>
        <asp:LinkButton ID="LinkButton1" runat="server" OnCommand="LinkButton1_Command" CommandName="MyUpdate" CommandArgument='<%# Eval("erid") %>'>LinkButton</asp:LinkButton>
    </ItemTemplate>
</asp:Repeater>
.cs
------------------
protected void LinkButton1_Command(object sender, CommandEventArgs e)
{
    if (e.CommandName == "MyUpdate"){
        
        //Do something
    }
}
  Permalink  
v3
Comments
Member 9579525 23-Jan-13 7:28am
   
thanks...but still doesnt fire event..I want to fetch data on poopup..plz give me solution...

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


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100