Problems with UpdatePanel on SharePoint

If you want to add some AJAX flavour to your ASPX pages running on SharePoint you need to perform a few actions:

  • install ASP.NET AJAX on servers in your farm
  • extend SharePoint web.config file with Microsoft ASP.NET AJAX
  • add ScriptManager either in the master page you’re using (prefferable) or in all pages that employ AJAX

The above listed steps are well described in the following article: Integrating ASP.NET AJAX with SharePoint.

However, at the end of the day you may (and probably will) end up with some problems during development. In short, not all works as it’s supposed to and how it does in a regular web project. One of the issues I had recently was UpdatePanel which made my page not working after a while.

Basically, I had an ASPX with some controls that had event handlers assosiated with them (e.g. buttons with onclick’s). There too was an UpdatePanel which was triggered by an event, let’s say “Click” perfomed on a button. This event made the UpdatePanel reload, BUT ONLY FOR THE FIRST TIME. Once reloaded, none of the handlers assosiated with any of the controls on the page worked.

I did a lot of googling but finding the answer was not that easy. Finally my friend gave me the link to this article. The solution is described in section “Using UpdatePanels within SharePoint”. The author suggests to add this JavaScript code to the page:

<script type="text/javascript">
    _spOriginalFormAction = document.forms[0].action;

8 Responses to “Problems with UpdatePanel on SharePoint”

  • Thank you … I’ve been searching for this answer for a while and most of the solutions were soooooooo confusing.

  • Thanks for posting this, just came across this today and this fixed my issue. My client has a public facing MOSS site and for some reason the UpdatePanel worked fine in Firefox, but would cause a full blown postback in IE. This solution worked great. Thanks!

  • Issue with Infragistics UltraWebGrid Control(included in an UpdatePanel) in a sharepoint Web part

    Hi Jarosław Dobrzański,

    Iam also on MOSS-SP1,I have created a custom user control and included the (Infragistics Ultrawebgrid within an UpdatePanel) in it.And this custom user control is instantiated and included in a web part class.
    This webpart when hosted on a sharepoint page works well without the UpdatePanel. But does not work as required with the UpdatePanel.UpdatePanel is used to allow UltraWEbGrid control inside the Update panel participate in partial-page updates when any Ultrawebgrid control in the panel causes a postback.

    Issue Description: The SORTING and DELETE functionailty of the Ultrawebgrid control are not reflecting on the same screen.
    The DELETE and SORT events are getting triggered but the changes in the grid after any of the delete\sort operation is not reflecting on the screen(without postback as UpdatePanel is involved). But the SORTING and DELETE operations are working fine without the UpdatePanel.

    NOTE:But these SORTING and DELETE operations are working fine on an ASP web site.

    I have included the web.config entries for AJAX to work on a sharepoint site and added ScriptManager tag in the master page.

    I have also included the piece of Javascript that you have suggested in this post in teh Master page. But still i have issue described above.
    Any help regarding this is appreciated.

  • Nikhil, unfortunately I have no idea… Maybe there’s a reader of this blog who could help? Everyone is invited!


    This worked! You’re a life savior!

    Almost for 2 days in a row it had me!

    Thanks again!

  • i configured my web.config in order to add the ajax extensions
    but when i added the update panel to my newform.aspx page
    it still posted back the request…it didnt work
    happened with anyone?

  • THANKS!! Thank you so much, I’ve spent so much time on this and it worked perfectly, you are my hero and I wish for you this Christmas that all your wishes may come true

Leave a Reply