Home » Questions » Computers [ Ask a new question ]

Can ASP.NET AJAX partial rendering work inside a SharePoint 2007 application page?

Can ASP.NET AJAX partial rendering work inside a SharePoint 2007 application page?

"I have a simple page with my ScriptManager and my UpdatePanel, and my ContentTemplate has one ListBox and one Label. I am just trying to catch its OnSelectionChanged so I can update the text in the Label. No matter what settings I try to tweak, I always get a full-page postback.

Is this really not going to work, or am I just screwing this up?"

Asked by: Guest | Views: 95
Total answers/comments: 4
Guest [Entry]

"You need to have Sharepoint 2007 service pack 1 -- or else there's no chance.
(Sharepoint 2007 predates ajax 1.0 -- they built some support into service pack 1)

Next, from a trouble shooting point of view, test that the exact same code functions as expected when hosted in a regular asp.net page. (Literally copy and paste your code across into a fresh page, to rule out any typographical errors). Ruling sharepoint in or out of the problem area will help narrow down the solution space."
Guest [Entry]

"If you have installed SharePoint 2007 (without Service Pack 1) then you can follow an example like the following article:

AjaxBasePart: Easy ASP.NET 2.0 AJAX Extensions 1.0 and Office SharePoint Server 2007

The reason for this is that there exists a specific problem with mixing doPostback, UpdatePanel and SharePoint -- and the symptom is exactly what you're seeing: a full-page postback instead of an asynchronous postback. See this KB article for a workaround: A Web Part that contains an ASP.NET AJAX 1.0 UpdatePanel control that uses the _doPostBack() ...

Otherwise you can just install Service Pack 1 to fix your problem:

Windows SharePoint Services 3.0 Service Pack 1 (SP1)"
Guest [Entry]

There's a specific problem with mixing doPostback, UpdatePanel and SharePoint -- and the symptom is exactly what you're seeing: a full-page postback instead of an asynchronous postback. See this KB article for a workaround: http://support.microsoft.com/kb/941955
Guest [Entry]

"Todd Bleeker at Mindsharp showed me a piece of code he wrote that can use Ajax on Sharepoint 2.0. It was pretty cool. I believe the company used it on their sharepoint site managment software if you want to take a look. (you used to be able to request a 30 day trial). I bet how to do it is on their yahoo group (I can't remember the name, but I am sure that if you search for mindsharp you'll find it.)

As a note, Ajax has been around for a long time. Microsoft easily supported it since 2002 maybe earlier with the release of IE 5.5 (I don't know about other browsers, I was doing internal development and we only supported ie at the time). It just wasn't called that. The term Ajax is nothing more than a marketing term that someone coined later on."