jmoreno
jmoreno

Reputation: 13561

What happens when an update panel doesn't have any triggers?

I have the markup below, there is no triggers section and no setting of the triggers in the code behind. When I click on the checkbox, the page does update and show the hidden div (server side code sets visible), but page loading spinner in the page tab doesn't spin in chrome. If I remove the update and template tags, the page seems to act the same except that the page loading spinner spins.

What is actually happening? Is the page being reloaded or not? If the update panel is loading the page, why is it doing so without a defined AsyncPostBackTrigger?

<asp:UpdatePanel runat="server" ID="pnlMain">
   <ContentTemplate>
       <div class="control-group">
             Hide Div                  
                <div class="controls">
                    <asp:CheckBox ID="chkbx" CssClass="Input" runat="server" AutoPostBack="true" />
                </div>
       </div>
       <div id="divToHide" runat="server">
          stuff to hide when div is clicked
       </div>
       <div class="form-actions">
        <asp:LinkButton ID="btnSubmit" runat="server" Text="Submit"  />
       </div>
    </ContentTemplate>
</asp:UpdatePanel>

Upvotes: 0

Views: 36

Answers (1)

Gagan Deep
Gagan Deep

Reputation: 1509

Page is loaded in both cases. With Update Panel only Partial Page(Content inside the Content Template is updated) whereas in normal case entire page is re-rendered.

Upvotes: 1

Related Questions