How to stop UpdatePanel from causing whole page postback?

前端 未结 6 655
温柔的废话
温柔的废话 2020-12-09 18:22

I am using .NET 3.5 and building pages inside of the Community Server 2008 framework.

On one of the pages, I am trying to get an UpdatePanel working.

I took

6条回答
  •  天涯浪人
    2020-12-09 19:03

    I'm not seeing Label2 in your code sample above. If Label2 is located outside the UpdatePanel, a full page refresh will occur because that is what is required for the page to properly update Label2.

    By default, UpdatePanels will only dynamically refresh the content within them, when triggered by controls within them. If you need to do some fancier updates, say a button outside of the panel causing the refresh or a label in a different panel to be updated, then you need to set the Conditional attribute on your UpdatePanel(s) and make some manual Update calls in your code.

提交回复
热议问题