views:

187

answers:

2

we are using Ajax Update Panel in SharePoint web part to avoid postback, Certainly it is the easiest approach out there to provide ajax functionality.But at times it feels like the performance is horrible!!

Are there any better approach where in you get better performance then ajax update panel.

thanks.

+1  A: 

Hi Nikhil

If you're interested in better performance then the Update Panel isn't going to help you.
It's purely a User Experience thing!

When you're using the Update Panel:

  • Browser is still doing the full post to the server
  • Server is doing all the usual work for ALL the web parts on the page
  • Server graps the HTML inside the update panel and sends this and ViewState to browser
  • Browser replaces ViewState and HTML inside Update Panel

But Using the Update Panel is very easy and you don't have to know any JavaScript

Using "real" AJAX would mean:

  • You have to know JavaScript
  • You have to know/develop Web Services
  • BUT only the requested functionallity will have to run on the server, so you'll usually get a lot better performance
Per Jakobsen
+1  A: 

NEVER EVER EVER user MS Ajax and the update panel. You will be burnt sooner or later.

Instead, use jQuery and it's ajax methods.

Why?

a) jquery is smaller (and therefore faster?) b) you can do more with jquery by iteself than ms ajax c) trying to hide ajax in server controls is a dumb idea from the start d) web forms and server controls in general suck - less is more e) sooner or later you will need to get down and dirty with ajax - better to start at a lower level

Cheers

Jonesie