Click here to Skip to main content
Rate this: bad
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">
                         <table >
                             <td><b>Job Title:</b></td>
                                <asp:Label ID="Label1" runat="server" Text='<%#Eval("JOB_TITLE") %>'></asp:Label>
                            <td><b>Posted Date:</b></td>
                                <asp:Label ID="Label2" runat="server" Text='<%#Eval("JOB_DATE") %>'></asp:Label>
                            <div class="careeropeningbtn">
                                        <asp:LinkButton ID="LnkbtnViewmore"  CommandArgument='<%#Eval("JOB_ID") %>' runat="server" OnClick="LnkbtnViewmore_Click"  >
                                        View More..
<cc1:ModalPopupExtender PopupControlID="Panel1" TargetControlID="LnkbtnViewmore" ID="Mpecopening" runat="server" >

<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;">

                                      <asp:Label ID="LblATjobdtl1" runat="server" ></asp:Label>
                                  <p class="popupp">
                                      <asp:Label ID="LblATjobdsc1" runat="server" ></asp:Label>
                                  <div class="popupfloat" >
                                        <span class="redcolor">
                                      <asp:Label ID="LblATexp1" runat="server" >
                                  <div class="popupfloat" >
                                        <span class="redcolor" >
                                      <asp:Label ID="LblATsal1" runat="server" >
                                  <div class="clear"></div>
                                  <div class="popupdate">
                                  Post Date: <span class="datecolor">
                                      <asp:Label ID="LblATpdate1" runat="server" >
                            <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" />
Posted 23-Jan-13 0:42am

1 solution

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

Solution 1

You can not evoke onclick event in repetaer or any data controls
check this..[^]
<asp:Repeater ID="Repeater1" runat="server">
        <asp:LinkButton ID="LinkButton1" runat="server" OnCommand="LinkButton1_Command" CommandName="MyUpdate" CommandArgument='<%# Eval("erid") %>'>LinkButton</asp:LinkButton>
protected void LinkButton1_Command(object sender, CommandEventArgs e)
    if (e.CommandName == "MyUpdate"){
        //Do something
Member 9579525 at 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
0 Sergey Alexandrovich Kryukov 458
1 OriginalGriff 344
2 George Jonsson 233
3 Animesh Datta 130
4 Shemeemsha RA 128
0 OriginalGriff 6,179
1 Sergey Alexandrovich Kryukov 5,616
2 CPallini 4,770
3 George Jonsson 3,400
4 Gihan Liyanage 2,522

Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2014
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