Skip to content

Commit 0e150c4

Browse files
author
Marin Bratanov
committed
docs(ajax): troubleshooting for RadAjax in SharePoint
1 parent 19cf8d0 commit 0e150c4

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

controls/ajaxmanager/troubleshooting/dynamically-adding-radajaxmanager-to-sharepoint-web-parts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Dynamically Adding RadAjaxManager to Sharepoint Web Parts
55
slug: ajaxmanager/troubleshooting/dynamically-adding-radajaxmanager-to-sharepoint-web-parts
66
previous_url: ajax/radajaxmanager/troubleshooting/dynamically-adding-radajaxmanager-to-sharepoint-web-parts
77
tags: dynamically,adding,radajaxmanager,to,sharepoint,web,parts
8-
published: True
8+
published: false
99
position: 4
1010
---
1111

sharepoint/troubleshooting/sharepoint-ajax-updates.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,25 @@ title: Using AJAX in SharePoint WebParts
33
page_title: Using AJAX in SharePoint WebParts | UI for ASP.NET AJAX Documentation
44
description: Using AJAX in SharePoint WebParts
55
slug: sharepoint/troubleshooting/sharepoint-ajax-updates
6+
previous_url: controls/ajaxmanager/troubleshooting/dynamically-adding-radajaxmanager-to-sharepoint-web-parts
67
tags: sharepoint,ajax
78
published: True
89
position: 0
910
---
1011

11-
# Using AJAX in SharePoint WebParts
12+
# Using Telerik AJAX in SharePoint WebParts
1213

1314

1415

15-
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.
1617

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
1825
1926
````C#
2027
public class WebPart1 : WebPart
@@ -99,3 +106,31 @@ End Class
99106
````
100107

101108

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:
125+
126+
**Markup**
127+
128+
<SharePoint:AjaxDelta id="DeltaSPWebPartManager" runat="server">
129+
<WebPartPages:SPWebPartManager runat="server">
130+
</WebPartPages:SPWebPartManager>
131+
</SharePoint:AjaxDelta>
132+
133+
134+
* Use only **asp:UpdatePanel** and **asp:UpdateProgress** controls to AJAX-enable the content, without using RadAjax.
135+
136+

0 commit comments

Comments
 (0)