Click here to Skip to main content
13,090,170 members (48,691 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 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 |
Web04 | 2.8.170813.1 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2017
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