Referencing Microsoft.Practices.SPG.AJAXSuppor t.dll

Hi all,

I want to use AJAX UpdatePanels in my SharePoint webparts. Therefore, according to http://msdn.microsoft.com/en-us/library/ff650218.aspx, I should be using the SafeScriptManager. To use this control, I need to reference Microsoft.Practices.SPG.AJAXSupport.dll.

The problem is that I can't seem to find this dll file. From what I've read, it should be in the SharePoint Guidance Library 2010. I downloaded the library from http://www.microsoft.com/en-us/download/details.aspx?id=23919. I think I have to manually build the project, but I don't know which project to build. Can anyone point me in the right direction?

Thank you in advance!

July 16th, 2012 10:14pm

Hi

have you checked here? : http://spg.codeplex.com/

Free Windows Admin Tool Kit Click here and download it now
July 16th, 2012 10:20pm

Hi Bjoern,

CodePlex links to http://www.microsoft.com/spg, which links right back to the download link I listed in my question. So, yes, I checked CodePlex. But, no, it doesn't seem to help me. What am I missing?

Thanks.

July 17th, 2012 1:10pm

Is the SafeScriptManager required in SharePoint 2010? I just realized that the SafeScriptManager article referenced in my question was written for SharePoint 2007.

In Microsoft's AjaxDemoWebPart.cs, they note:

/// For this to work, there must be a <asp:ScriptManager> control on the page. In     
/// SharePoint 2010, this is including in all master pages. Unless you are using    
/// a custom master page that doesn't include a script manager, you can use AJAX    
/// controls in Web Parts without creating it.

Therefore, should I have to do anything special to get AJAX to work?

If I have one web part with an UpdatePanel on my SharePoint page, everything seems to work fine. If I have two web parts with UpdatePanels, neither one will perform an async postback. Any ideas?

Free Windows Admin Tool Kit Click here and download it now
July 17th, 2012 3:18pm

Ooops. It appears that I've been barking up the wrong tree.

It turns out that my async postback-triggered code was throwing an unhandled exception. The exception did not appear on the screen, though, unless I triggered a full-page postback on the page. Therefore, from my point of view, it looked like the async postback wasn't occurring, when it really was occurring triggering an error and preventing further async postbacks.

So, AJAX seems to work OOTB of the box in SharePoint 2010 after all. Cool.

Sorry for leading you all down the wrong track!

July 17th, 2012 3:42pm

No problem, happy to see when things work well ! :- ) .  Any post here has its worth, there's always something to learn from it.
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2012 3:53pm

Hi SPKoder,

I know it's late to reply to this thread but I'm stuck with the same problem now. Been trying to use the OOTB AJAX script manager and update panel in my custom SharePoint page, and encountered the same problems you mentioned in your first post above. How did you workaround this issue? Would really appreciate if you could list the steps in detail.

Thanks,

Aswin - SharePoint Developer

October 22nd, 2012 5:53am

Hi Aswin,

From my experience, there is no need to do anything with the script manager. SharePoint already handles this for you within the master page. Wrap the controls you want to postback asynchronously in an UpdatePanel. I've gotten into the practice of explicitly defining all the triggers in my UpdatePanel (as sometimes it doesn't seem to work without it). MSDN documentation on UpdatePanel is here.

Watch your error handling in the async postbacks. My confusion arose from an error that would have given an error screen if it was a full page postback, but being an async postback just stopped the postback from completing. Therefore, I thought it was not posting back at all. In actuality, it was posting back and encountering an error while executing the postback event. Maybe start with a simple postback event to see if postback is occuring at all. Then, add in any more complex code you may have.

Good luck!

Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2012 11:56pm

Unfortunately http://spg.codeplex.com/releases deoesn't contain Microsoft.Practices.SPG.AJAXSupport.dll at all. Where else can I find the library?
April 11th, 2015 12:32pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics