Simple example with UpdatePanel results in full refresh of page after postback

Rate It (1)

Last post 04-05-2007 4:03 PM by eh4316. 10 replies.

Sort Posts:

  • Simple example with UpdatePanel results in full refresh of page after postback

    02-20-2007, 8:19 AM

    Has anyone encountered a problem where creating a simple example with the UpdatePanel always results in a full refresh of the page after the postback?

     I created a page where I have a label outside the UpdatePanel and a label inside the UpdatePanel along with the button to cause the postback. Both labels showed the date and time (set during the PageLoad event handler). After clicking on the push button, the full page is refreshed instead of just one of the labels. I know that the full page was refreshed as I also added a script code to display an alert(). If everything was working correctly, the alert would only be displayed once when the page is loaded for the very first time. But, it is displayed after each postback.

     The example was created using the AJAX web site template in VS Team Suite. This is being tested on XP SP2 fully patched.

  • Re: Simple example with UpdatePanel results in full refresh of page after postback

    02-20-2007, 8:54 AM
    • Loading...
    • Digs
    • Joined on 05-09-2006, 4:35 PM
    • Posts 3

    Either you keep button and label inside UpdatePanel or

    Keep button outside UpdatePanel and write code in Following maneer for UpdatePanel ......

    <Triggers>
    <asp:AysyncTrigger ContriolID="Button1" EventName="Click">
    </asp:AysyncTrigger>
    </Triggers>

  • Re: Simple example with UpdatePanel results in full refresh of page after postback

    02-21-2007, 7:44 AM
    I did both. And, in both cases, the full refresh still occurred.
  • Re: Simple example with UpdatePanel results in full refresh of page after postback

    02-21-2007, 3:05 PM

    Try setting the EnablePartialRendering="true" in the ScriptManager. 

     <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
    </
    asp:ScriptManager>

  • Re: Simple example with UpdatePanel results in full refresh of page after postback

    02-22-2007, 1:13 PM
    • Loading...
    • eh4316
    • Joined on 02-15-2007, 4:44 PM
    • Posts 15

    You might want to try posting your web.config. Also, if you see this in web.config try removing it and see if that fixes the problem. I had a similar issue when I began trying to modify existing apps to support ajax.

    <xhtmlConformance mode="Legacy"/>

     

  • Re: Simple example with UpdatePanel results in full refresh of page after postback

    02-28-2007, 4:33 PM
    • Loading...
    • mljdtj
    • Joined on 11-16-2006, 4:28 PM
    • Posts 5
    Thanks eh, that worked for me!
  • Re: Simple example with UpdatePanel results in full refresh of page after postback

    03-14-2007, 4:22 PM
    • Loading...
    • NWGaEagle
    • Joined on 03-13-2007, 7:49 PM
    • Posts 7
    eh4316:

    You might want to try posting your web.config. Also, if you see this in web.config try removing it and see if that fixes the problem. I had a similar issue when I began trying to modify existing apps to support ajax.

    <xhtmlConformance mode="Legacy"/>

    Excellent catch, thanks for this.

  • Re: Simple example with UpdatePanel results in full refresh of page after postback

    03-16-2007, 1:14 AM
    • Loading...
    • Swell
    • Joined on 03-16-2007, 5:12 AM
    • Posts 13

     

    eh4316:

    You might want to try posting your web.config. Also, if you see this in web.config try removing it and see if that fixes the problem. I had a similar issue when I began trying to modify existing apps to support ajax.

    <xhtmlConformance mode="Legacy"/>

     

    LEGEND! I had same problem as OP and this fixed it!

    I wonder what that line of code did anyway.....Confused

  • Re: Simple example with UpdatePanel results in full refresh of page after postback

    04-05-2007, 4:00 PM
    • Loading...
    • eh4316
    • Joined on 02-15-2007, 4:44 PM
    • Posts 15
    Swell:

     

    eh4316:

    You might want to try posting your web.config. Also, if you see this in web.config try removing it and see if that fixes the problem. I had a similar issue when I began trying to modify existing apps to support ajax.

    <xhtmlConformance mode="Legacy"/>

     

    LEGEND! I had same problem as OP and this fixed it!

    I wonder what that line of code did anyway.....Confused

    Scott Guthrie provides a great explanation of this in his blog... http://weblogs.asp.net/scottgu/archive/2006/12/10/gotcha-don-t-use-xhtmlconformance-mode-legacy-with-asp-net-ajax.aspx 

  • Re: Simple example with UpdatePanel results in full refresh of page after postback

    04-05-2007, 4:00 PM
    • Loading...
    • eh4316
    • Joined on 02-15-2007, 4:44 PM
    • Posts 15
    Swell:

     

    eh4316:

    You might want to try posting your web.config. Also, if you see this in web.config try removing it and see if that fixes the problem. I had a similar issue when I began trying to modify existing apps to support ajax.

    <xhtmlConformance mode="Legacy"/>

     

    LEGEND! I had same problem as OP and this fixed it!

    I wonder what that line of code did anyway.....Confused

    Scott Guthrie provides a great explanation of this in his blog... http://weblogs.asp.net/scottgu/archive/2006/12/10/gotcha-don-t-use-xhtmlconformance-mode-legacy-with-asp-net-ajax.aspx 

  • Re: Simple example with UpdatePanel results in full refresh of page after postback

    04-05-2007, 4:03 PM
    • Loading...
    • eh4316
    • Joined on 02-15-2007, 4:44 PM
    • Posts 15
    Sorry for the double post and poor attempt at using the quote there.. When i clicked post I received a page exception and wasn't aware that this actually posted back.
Page 1 of 1 (11 items)
Microsoft Communities
Page view counter