Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Updatepanel does full postback

$
0
0

I have below design in my aspx page.

<asp:UpdatePanel id="up1" runat="server" UpdateMode="Conditional"
<ContentTemplate>

<asp:RadioButtonList RepeatDirection="Horizontal" AutoPostBack="true" ID="rdolist"
                    runat="server" OnSelectedIndexChanged="rdolist_SelectedIndexChanged">
                    <asp:ListItem Text="Item 1" Value="0"></asp:ListItem>
                    <asp:ListItem Text="Item 2" Value="1"></asp:ListItem>
                </asp:RadioButtonList>

 </ContentTemplate>
  </asp:UpdatePanel>


<asp:UpdatePanel id="up2" runat="server" UpdateMode="Conditional"
<ContentTemplate>
<asp:panel id="pnl1" runat="server">
                usercontrol1
</asp:panel>

 </ContentTemplate>
  </asp:UpdatePanel>

<asp:UpdatePanel id="up3" runat="server" UpdateMode="Conditional"
<ContentTemplate>
<asp:panel id="pnl1" runat="server">
               usercontrol2
</asp:panel>

 </ContentTemplate>
  </asp:UpdatePanel>


On change event of radiobuttonList:

On selectedindex = 0
pnl1 visible and pnl2 will be hidden

On selectedindex = 1
pnl1 hidden and pnl2 will be visible.

When i select "item 2" it will work fine and will do partial postback.

but when i select "item 1" again it will first do partial postback and than will show one flick in the page.
So it seems like it does full postback once response from partial postback is received.

What might be the reason for this strang behavior?


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>