You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Ajax in SharePoint WebParts we recommend to add **RadAjaxManager** programmatically. This should be done in the **OnInit** event of the Web Part and then add the ajax settings in **CreateChildControls**.
16
+
When using Ajax in SharePoint WebParts we recommend to add **RadAjaxManager** programmatically.
16
17
17
-
Here is a short example of what the code-behind will look in this case:
18
+
This should be done in the `OnInit` event of the Web Part
19
+
20
+
You should then add the ajax settings in `CreateChildControls`.
21
+
22
+
Here is a short example of what the code-behind can look in this case:
23
+
24
+
>caption How to use RadAjax in SharePoint Web Parts
18
25
19
26
````C#
20
27
publicclassWebPart1 : WebPart
@@ -99,3 +106,31 @@ End Class
99
106
````
100
107
101
108
109
+
110
+
## Troubleshooting
111
+
112
+
Avoid using two different methods of AJAX-enabling content. For example, if you use the approach above, do not use **RadAjaxPanel** or **asp:UpdatePanel** for the same content.
113
+
114
+
**RadAjaxPanel** cannot be guaranteed to work as expected under SharePoint.
115
+
116
+
Make sure there are no JavaScript errors or invalid markup on the page. Either of these issues tends to break AJAX requests.
117
+
118
+
If you get the following error:
119
+
120
+
>The control collection cannot be modified during DataBind, Init, Load, PreRender or Unload phases
121
+
122
+
you can try these options:
123
+
124
+
* Move the SharePoint Web Part Manager from the header to the body, or after the script manager. Here is an example of what you should look for:
0 commit comments