gruber
gruber

Reputation: 29727

two updatePanels

Ive got two update panels on my site. Each one has got repeaters. Is it possible to refresh only one of them without need to rebind repeaters inside the other ? thanks for any help

There is One updatePanel:

<UpdatePanel runat="server" id ="upd1" UpdateMode = "condicional'>
<ContentTemplate>
     <repeater>
</Contentemplate>
</updatePanel>

<updatePanel runat="server" id="ipd2" >
<COntentTemplate>
    <LinkButton>
</ContentTemplate>
</UpdatePanel>

When I click on link button both updatepanels are updated :(

OK the UpdatePanel wasnt updated but it was because of javascript. I need to run that javascipt in order to apply jquery carousele to the repeater in first div. Is it possible keep functionality of the carousel without invoking js code when second updatePanel is updated ?

Upvotes: 1

Views: 168

Answers (3)

Waqar Janjua
Waqar Janjua

Reputation: 6123

Set the update Mode of the Inner Update panel to Conditional. Inner update panels are automatically updated by the outer update panels.

Upvotes: 0

Muhammad Akhtar
Muhammad Akhtar

Reputation: 52241

Set UpdateMode="Conditional" and when you want to update Call UpdatePanel1.Update(); to update specific updatepanel

 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> 
        <asp:Repeater runat="server" ID="rptContents">
    </asp:UpdatePanel>

Upvotes: 2

Bala R
Bala R

Reputation: 108947

Set the UpdateMode for the UpdatePanel to Conditional and set up appropriate triggers that should cause updates.

Upvotes: 2

Related Questions