Recently I had to integrate Ajax with Share Point in order to provide much needed user experience in my current project.One of the main concern was when ever a user submit a request in a page the page get refreshed.For some users it is indeed a frustrating experience.
As every one of you do ,tell me if not, I searched in Google with the term "Integrating ASP.NET AJAX with SharePoint". Bingo.... here comes the results and I read the preview of the first search result and opened the entry.
It was from the "Mike Ammerlaan's Blog " and I started reading the post and realized that this is exactly what I wanted and no need to look for a better post for the job at my hand.
I followed all the steps for the "Adding Microsoft ASP.NET AJAX Technology to SharePoint Pages" and after about hour and so I managed to integrate Ajax to my sharepoint installation.
So I thought of blogging this wonderful post for those who are reading my blog.
Then I modified one of my web part used in the project with an update panel which takes care of your asynchronous postbacks.And then I deployed the web part in the integration server , to my embarrassment the web part was not working.Actually nothing got displayed.Started scratching my head and figuring out what went wrong.
Going back to drawing board and started every web.config entry for Ajax integration and that was fine.Then suddenly I saw in the top of the ascx page the version of the "System.Web.Extensions" assembly is 1.0.61025.0 which is the version I have installed in my development environment.Then I checked the version in the sharepoint environment.That is 184.108.40.206 which comes with the .Net Framework 3.5.And that was that. I changed the version and here comes the details.
In this page I have a list of items in a one list box and you can add selected items to another list.So started to check whether it was working.I selected an item from the source list and click on the button to move and it worked like a charm.ie the item get moved to the destination list without page getting refreshed. I was really happy with it.
But then I wanted to move another item from the list and nothing happened.Mission failed. :(
So I started looking back at the post I mentioned above and it stated that, there is a hack you need to do because of the way windows sharepoint services works.
So that was the trick and I managed to do that trick with the help of the following blog entry.
Finally I managed to integrate Ajax with sharepoint and used an update panel in my web parts.
Credit goes to those two blogs.