0

I did what i normally do whenever i want a partial refresh of a page, but in this case it doesnt work out. There maybe an excessive usage of update panels but it should still work.... Can anyone tell me why?

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div style="width: 15%; float: left;">
            <asp:Image ID="Image1" runat="server" ImageUrl="~/Img/Untitled1.png" CssClass="imagez" />
        </div>
    </ContentTemplate>
</asp:UpdatePanel>

<asp:UpdatePanel ID="UpdatePanel2" runat="server">
    <ContentTemplate>
        <div style="width: 85%; float: left; height: 100%; padding-top: 2%;">
            <asp:Label ID="Label2" runat="server" Text="CPU" CssClass="auto-style7" Font-Names="sans-serif"></asp:Label>
            <br />
            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" CssClass="bla"  Font-Names="sans-serif" AppendDataBoundItems="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                <asp:ListItem Selected="True">Pick a CPU</asp:ListItem>
                <asp:ListItem Text="a" Value="a"></asp:ListItem>
            </asp:DropDownList>
            <strong>
                <asp:Label ID="Label3" runat="server" Text="$" CssClass="auto-style8" Font-Names="sans-serif"></asp:Label>
                <asp:Label ID="Label4" runat="server" Text="0.00" CssClass="auto-style8" Font-Names="sans-serif"></asp:Label>
            </strong>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
VDWWD
  • 35,079
  • 22
  • 62
  • 79
Nicholas
  • 13
  • 8
  • When does it update the entire page, if you select something from `DropDownList1`? – Tim Schmelter Nov 25 '16 at 14:17
  • Consider specifying `UpdateMode="Conditional"` on your UpdatePanels. Right now it is possible that a single control posting back results in both panels being refreshed. – Frédéric Hamidi Nov 25 '16 at 14:17
  • How is this different from your [other question](http://stackoverflow.com/questions/40801332/entire-webpage-still-refreshes-despite-using-update-panel)? – VDWWD Nov 25 '16 at 14:20
  • Tim Schmelter - Ya that's right. – Nicholas Nov 25 '16 at 14:30
  • VDWWD - Ya. The reason why i posted this, is because the previous one is kinda dead and confusing already. I edited my post entirely in that previous one twice. – Nicholas Nov 25 '16 at 14:32
  • Frédéric Hamidi - My DropDownList1's SelectedIndexChanged, updates the items in both updatepanels – Nicholas Nov 25 '16 at 14:38
  • @Nicholas, yes, that's what happens when the panel's `UpdateMode` is set to `Always`, which is the default. Please heed my first comment. – Frédéric Hamidi Nov 25 '16 at 14:48
  • @ Frédéric Hamidi - Hey, just heeded your advice but to no avail. The whole thing still refreshes... – Nicholas Nov 25 '16 at 14:56
  • @Nicholas, then I cannot explain it with the information I have. My next step would probably be firing up Fiddler or similar and checking if the responses are characteristic of partial or full postbacks. Before that, though -- maybe you have some error messages in your console that you can share with us? – Frédéric Hamidi Nov 25 '16 at 15:05
  • @ Frédéric Hamidi - Nah, there is no errors anymore in my console.... bad days – Nicholas Nov 25 '16 at 15:16

0 Answers0