0

I have a updatePanel with a LinkButton and in the LinkButton are some Controller.

<asp:UpdatePanel ID="UpdateRepTrack" runat="server">
    <ContentTemplate>
        <asp:UpdateProgress ID="updateProgress" runat="server" AssociatedUpdatePanelID="UpdateRepTrack" DynamicLayout="true">

                    ....

        </asp:UpdateProgress>
        <ItemTemplate>

          ....

          <asp:Repeater ID="Repeater1" runat="server">
             <ItemTemplate>
               <asp:LinkButton ID="LinkButton1" runat="server">
                  <asp:Label ID="Label1" runat="server"></asp:Label>
                  <asp:Literal  ID="Literal1" runat="server"></asp:Literal>
               </asp:LinkButton>
             </ItemTemplate>
          </asp:Repeater>

          ....

       </ItemTemplate>
     </ContentTemplate>
 </asp:UpdatePanel>

Now when I click on the Text(Label) the page do a Full Postback, but when I click next to the Text(on the Link directly) then the page do an asynchronous postback. Can me help someone with a solution so that I get asynchronous postback everywhere.

Thanks.

Solution I have tried

I have tried to add this code behinde

       With CType(e.Item.FindControl("LinkButton1"), LinkButton)
            Dim trigger As New AsyncPostBackTrigger
            trigger.ControlID = .UniqueID
            UpdateRepTrack.Triggers.Add(trigger)
        End With
Amin Bakhtiari Far
  • 156
  • 1
  • 1
  • 12

1 Answers1

0

I have found a solution. When you add the "clientIDMode" attribute to the linkbutton it works fine.

<asp:LinkButton  ID="LinkButton1" clientIDMode="AutoID" runat="server">
   <asp:Label ID="Label1" runat="server"></asp:Label>
   <asp:Literal  ID="Literal1" runat="server"></asp:Literal>
</asp:LinkButton>

I have tried a little round with a clear page. Then I have removed the repeater and it works. After this I found this page Leonid's space and this was the solution.