SmartPart with AJAX postbacks

Mar 13, 2009 at 3:43 PM
Hi,

I am using a SmartPart with AJAX to host a timesheet usercontrol.  I can add the smartpart to the page and select the usercontrol without troubles.
The odd thing is that whenever I press a button, it always triggers a postback.
After a while I replaced my usercontrol with an extremely simple ascx that adds 2 numbers. No codebehind file, everything in one updatepanel, no triggers. Same thing!
When I add this usercontrol to a regular aspx everything works as expected.

I'm running .NET Framework 3.5 SP1.  SmartPart is registered as a safecontrol in web.config. Added the bindingRedirect from v.1 to v.3.5 as well.

Any ideas?  Tia!
Oct 29, 2009 at 9:47 PM

Hi,

i had the same problem today and i figured out the it was created by the tag <WebPartPages:SPWebPartManager runat="server"/>
wich was out of the form tag!!!

Some of the default masterpages of sharepoint have this control outside the form tag (example:BlueBand.master, BlueTabs.master) wich results in the problem you have. I think only the default.master is correct.

So if you have this problem verify if in your masterpages you have the control <WebPartPages:SPWebPartManager runat="server"/> inside your form tag.

:)

Hope to help you.
http://www.istomesmo.com