Geeks With Blogs
Wayne Magnum's Blog

Error Message:
Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

Solution:
Disabled the view state for control.
this.[ControlName].EnableViewState = false;

 


Error Message:
Script controls may not be registered before PreRender.

Solution:
Added a reference of Script Manager to the current Master Page.
     Add to the top of the Master Page: <%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" Namespace="System.Web.UI" TagPrefix="asp" %>

Added <asp:Scriptmanager/> right below the <WebPartPages/> in the master page.
     Look for in the Master Page: <WebPartPages:SPWebPartManager id="m" runat="Server"/>
     Add: <asp:ScriptManager ID="scriptManager1" runat="server"></asp:ScriptManager>


Posted on Saturday, July 5, 2008 5:10 PM SharePoint 2007 | Back to top


Comments on this post: Ajax Enabled Webparts in MOSS: Work Arounds

# re: Ajax Enabled Webparts in MOSS: Work Arounds
Requesting Gravatar...
It's works !!!

Thanks a lot !!!
Left by Dude on Oct 09, 2008 11:24 AM

# re: Ajax Enabled Webparts in MOSS: Work Arounds
Requesting Gravatar...
Thanks a lot Wayne. It works for me also. :)
Left by Eugene Kochkin on Oct 31, 2008 8:34 AM

# re: Ajax Enabled Webparts in MOSS: Work Arounds
Requesting Gravatar...
I had to modify the version to suit our server's assembly.
And, I also had to make sure that this scriptmanager tag is added within a < form > tag.

works well for me.. thnx!!!
Left by Mathi on Jan 05, 2009 3:13 AM

# re: Ajax Enabled Webparts in MOSS: Work Arounds
Requesting Gravatar...
You are the man. Saved me a lot of time. Thanks!!!
Left by Roman on Oct 11, 2010 3:42 PM

Your comment:
 (will show your gravatar)


Copyright © Wayne H Magnum | Powered by: GeeksWithBlogs.net