ASP.NET AJAX / scriptmanager problem

Discussion in 'ASP .Net' started by JimL, Aug 2, 2007.

  1. JimL

    JimL Guest

    Hi,

    I've been given the job of "Ajaxifying" an existing application. If I
    create a new test page in the application, Ajax works fine. However
    when I add a scriptmanager and updatepanel to an existing page, it
    doesn't work - the page just gets completely refreshed.

    In each case, the Ajaxy parts of the .aspx file look identical, but
    when I look at the HTML in the browser page, I find that in the
    failing example, there is script at all for the scriptmanager.

    Anyone suggest why this might be?

    thanks,
    Jim
     
    JimL, Aug 2, 2007
    #1
    1. Advertising

  2. JimL

    JimL Guest

    On 2 Aug, 15:05, JimL <> wrote:
    > Hi,
    >
    > I've been given the job of "Ajaxifying" an existing application. If I
    > create a new test page in the application, Ajax works fine. However
    > when I add a scriptmanager and updatepanel to an existing page, it
    > doesn't work - the page just gets completely refreshed.
    >
    > In each case, the Ajaxy parts of the .aspx file look identical, but
    > when I look at the HTML in the browser page, I find that in the
    > failing example, there is script at all for the scriptmanager.


    Sorry, that should be "no script at all"
     
    JimL, Aug 2, 2007
    #2
    1. Advertising

  3. JimL

    Showjumper Guest

    So what i can gather from your post is that you are not getting the partial
    page updates with the UpdatePanel, correct?
    Make sure you have EnablePartialRendering set to true, also i found if the
    code behind method has the handles clause on it then the partial page
    updates dont work - the whole page posts back,

    "JimL" <> wrote in message
    news:...
    > On 2 Aug, 15:05, JimL <> wrote:
    >> Hi,
    >>
    >> I've been given the job of "Ajaxifying" an existing application. If I
    >> create a new test page in the application, Ajax works fine. However
    >> when I add a scriptmanager and updatepanel to an existing page, it
    >> doesn't work - the page just gets completely refreshed.
    >>
    >> In each case, the Ajaxy parts of the .aspx file look identical, but
    >> when I look at the HTML in the browser page, I find that in the
    >> failing example, there is script at all for the scriptmanager.

    >
    > Sorry, that should be "no script at all"
    >
     
    Showjumper, Aug 2, 2007
    #3
  4. JimL

    JimL Guest

    On 2 Aug, 23:28, "Showjumper" <nlsdkfja> wrote:
    > So what i can gather from your post is that you are not getting the partial
    > page updates with the UpdatePanel, correct?
    > Make sure you have EnablePartialRendering set to true, also i found if the
    > code behind method has the handles clause on it then the partial page
    > updates dont work - the whole page posts back,
    >


    Thanks Showjumper, I've actually nailed it - the script wasn't being
    rendered because the old web.config file has a tag :-

    <xhtmlConformance mode="Legacy"/>

    comment that out, and "voila" all the scripting starts to work. This
    wasn't mentioned in any of the documentation I looked at about adding
    AJAX to existing projects, and it really ought to be heavily flagged,
    as all my updates of our config file were correct, and I've had to
    binary chop my way through the damn thing to find this. Of course, now
    if I Google for "xhtml legacy ajax" there are all the other poor
    suckers who have suffered from this bug.

    Cheers everyone,
    Jim
     
    JimL, Aug 3, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Kershaw

    AJAX in ASP.Net ScriptManager error

    Steve Kershaw, Apr 25, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    471
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Apr 25, 2007
  2. Ryan
    Replies:
    0
    Views:
    428
  3. Yan
    Replies:
    1
    Views:
    789
  4. Scott M.
    Replies:
    2
    Views:
    1,389
    Scott M.
    Mar 16, 2009
  5. asp.net ajax
    Replies:
    2
    Views:
    1,612
    Gregory A. Beamer
    Dec 21, 2009
Loading...

Share This Page