Skip to content

Commit a366ec4

Browse files
Desislava Mihaylovavveesseelliinnaa
Desislava Mihaylova
andauthored
Ajax manager revamp pilot (#407)
* review the howtos of the ajaxmanager, part 1 * review howtos, ajaxmanager, part 2 * update ajaxmanager howtos, interim * move articles to kb section * move trblsht ajaxmanager to kb, spit, redirect, all * move client-side howtos to kb * move single articles outside folders, redircet * enhance ajaxmanager articles, initial * reorder * elaborate on ajax concept topics * review client-side api docs * review server-side ajaxmanager docs * finalize review for ajaxmanager * fix some issues after build * docs(ajax): Fix old slugs * docs(ajax): Fix code snipet formatting * docs(ajaxmanager): Apply feedback on the revamp * docs(ajaxmanager): Fix list * docs(ajaxmanager): Fix code snippets * docs(ajaxmanager): Fix code snippets * docs(ajaxmanager): Update snippets in list * docs(ajaxmanager): Fix snippets * docs(ajaxmanager): Update snippets * docs(ajaxmanager): Fix snippets Co-authored-by: vveesseelliinnaa <[email protected]>
1 parent f980d75 commit a366ec4

File tree

117 files changed

+4003
-3398
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+4003
-3398
lines changed

.gitignore

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2+
.DS_Store
23
.asset-cache/
34
.dockerignore
4-
.DS_Store
55
.editorconfig
66
.jekyll-metadata
77
.ruby-version
@@ -19,24 +19,24 @@
1919
/favicon.ico
2020
/fonts/
2121
/styles/
22+
CODEOWNERS
23+
Dockerfile
24+
Gemfile
25+
Gemfile.lock
26+
SlugLog.log
2227
_excludefile.yml
2328
_site
2429
_tempconfig.yml
2530
bs-config.js
2631
build-docs.sh
27-
CODEOWNERS
2832
copy_content.sh
2933
copy_local.sh
30-
Dockerfile
3134
exclude.txt
32-
Gemfile
33-
Gemfile.lock
3435
install-npm.sh
3536
knowledge-base.html
3637
modify-config.sh
3738
robots.txt
3839
search.html
39-
SlugLog.log
4040
start-docs.sh
4141
temp_exclude_result.tmp
4242
to_delete.md

_config.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ navigation:
167167
"controls/ajaxmanager":
168168
title: "AjaxManager"
169169
position: 1
170+
"controls/ajaxmanager/client-side-programming":
171+
title: "Client-Side API"
172+
position: 70
173+
"controls/ajaxmanager/server-side-programming":
174+
title: "Server-Side API"
175+
position: 80
170176
"controls/ajaxloadingpanel":
171177
title: "AjaxLoadingPanel"
172178
position: 1
@@ -544,12 +550,6 @@ navigation:
544550

545551

546552
## List control specific directory names and order here, like this:
547-
"*ajaxmanager/radajaxmanagerproxy":
548-
title: "RadAjaxManagerProxy"
549-
position: 6
550-
"*ajaxmanager/performance":
551-
title: "Performance"
552-
position: 8
553553
"*autocompletebox/client-side-programming/objects":
554554
title: "Objects"
555555
position: 4

_templates/radajax/common-errors.md

+19-17
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
#known-errors
22

3-
This help article describes common reasons for error messages and their solutions.
3+
This article lists the common error messages which may occur when working with Telerik UI for ASP.NET AJAX, and their causes and solutions.
44

5-
* **`SyntaxError`** (for IE) or **`Uncaught SyntaxError: Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to parse the rule'`** (for Chrome), or **`SyntaxError: An invalid or illegal string was specified`** (for FireFox).
5+
* The `SyntaxError` in Internet Explorer, `Uncaught SyntaxError: Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to parse the rule'` in Chrome, or `SyntaxError: An invalid or illegal string was specified` in FireFox occur.
66

7-
This error is caused by having commented CSS rules (e.g., `/* .someClass { display: none; } */`) in the `<head>` of your page.
7+
The cause for this error is the commented CSS rules in the `<head>` of your page, for example, `/* .someClass { display: none; } */`.
88

9-
RadAjax controls update the `<head>` of the page to let controls register stylesheets and scripts during an AJAX request and such commented rules cannot be parsed by the engine.
9+
The AjaxManager and Ajaxpanel update the `<head>` of the page to enable controls to register stylesheets and scripts during an AJAX request. Such commented rules cannot be parsed by the engine.
1010

11-
There are three solutions:
11+
To solve this issue, use any of the following approaches:
1212

13-
* Set the `EnablePageHeadUpdate` property of the RadAjax control to `false`.
13+
* Set the `EnablePageHeadUpdate` property of the Ajax control to `false`.
1414

1515
* Remove the commented CSS rule or move it to a separate stylesheet file.
1616

17-
* Place the styles settings in external css files.
17+
* Place the styles settings in external CSS files.
1818

1919

20-
* **Receiving `Sys.WebForms.PageRequestManagerParserErrorException`.** You may receive this error if you have used **RadAjaxPanel** and **RadAjaxManager** to AJAX-enable the same control at the same time. You can read more about the problem in the [Controls Wrapped in AjaxPanel and Added to AjaxManager Settings]({%slug ajaxmanager/troubleshooting/controls-wrapped-in-ajaxpanel-and-added-to-ajaxmanager-settings%}) help article.
20+
* `Sys.WebForms.PageRequestManagerParserErrorException` occurs.
2121

22+
A possible cause for this error is the usage of the AjaxPanel and AjaxManager to AJAX-enable the same control at the same time. For more information on the issue, refer to the article on [using controls wrapped in an AjaxPanel and added to the AjaxManager settings]({%slug ajaxmanager/troubleshooting/controls-wrapped-in-ajaxpanel-and-added-to-ajaxmanager-settings%}).
2223

23-
* **The state information is invalid for this page and might be corrupted.** Firefox 1.5 and up uses in-memory caching for entire web pages, including their JavaScript states, for a single browser session. Going backward and forward between visited pages requires no page loading and the JavaScript states are preserved. This feature, referred to by some as bfcache (for "Back-Forward Cache"), makes page navigation very fast. This caching state is preserved until the user closes the browser.Please refer to the [Ajax, ViewState and Firefox]({%slug ajaxpanel/troubleshooting/firefox-specifics%}) help article for more information and a workaround.
2424

25-
* Dialog with the following error: **`Unexpected AJAX response was received from the server`**. This may be caused by one of the following reasons:
25+
* `The state information is invalid for this page and might be corrupted` error occurs.
2626

27-
* `Server.Transfer()`.
28-
* Custom HTTP handler.
29-
* Incorrect loading of an AJAX-enabled user control.
27+
Firefox version 1.5 and later use in-memory caching for entire web pages, including their JavaScript states, for a single browser session. Going backward and forward between visited pages requires no page loading and the JavaScript states are preserved. This feature, referred to by some as bfcache (for "Back-Forward Cache"), makes page navigation very fast. The caching state is preserved until the user closes the browser. For more information and a workaround, refer to the article on [using Ajax, ViewState, and Firefox]({%slug ajaxpanel/troubleshooting/firefox-specifics%}).
3028

31-
**Verify that you don't get a server-side exception or any other undesired behavior, by setting the `EnableAJAX` property to `false`**.
29+
* `Unexpected AJAX response was received from the server` error occurs in a dialog.
3230

33-
Most often people see this error when using the `Server.Transfer` method. Note that some controls may use this method internally (like the `asp:LoginView` control). In order to redirect to another page in an AJAX-enabled application, you should use the approaches mentioned in the [Redirecting to another page] ({%slug ajaxpanel/how-to/redirecting-to-another-page%}) help article. In most cases, `Response.Redirect` does the trick. You can also try using the `Redirect` method of the `RadAjax` control you use.
31+
The possible causes for this issue may be any of the following:
3432

35-
Another reason you might see this error is because the application improperly loads user controls. The [Loading user controls]({%slug ajaxpanel/how-to/load-user-controls%}) help topic will help you fix the error in your code.
33+
* Using `Server.Transfer()`&mdash;Some controls may use this method internally, for example, the `asp:LoginView` control. To redirect to another page in an AJAX-enabled application, use the approaches from the article on [redirecting to another page]({%slug ajaxpanel/how-to/redirecting-to-another-page%}). To solve this issue, utilize `Response.Redirect`. You can also try using the `Redirect` method of the Ajax control you use.
3634

37-
Additionally, if the suggestions above do not help, you could disable AJAX as suggested in the error message. This will help you verify whether the error is related to using AJAX and if it is not, to fix any server-side errors if any are thrown.
35+
* Using a custom HTTP handler
36+
37+
* Incorrect loading of an AJAX-enabled user control. To solve the issue, refer to the article on [loading user controls]({%slug ajaxpanel/how-to/load-user-controls%}).
38+
39+
If the suggested solutions do not fix the issue, disable AJAX as suggested in the error message. Verify that you don't get a server-side exception or any other undesired behavior by setting the `EnableAJAX` property to `false`. This approach will help you verify whether the error is related to using AJAX and, if not, to fix any server-side errors if any are thrown.
3840

3941
#end

controls/ajaxmanager/accessibility-and-internationalization/wai-aria-support.md

-34
This file was deleted.

controls/ajaxmanager/advantages.md

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: Advantages
3+
page_title: AjaxManager Advantages
4+
description: "Learn more about the advantages of using the Telerik UI for ASP.NET AjaxManager."
5+
slug: ajaxmanager/getting-started/radajax-advantages
6+
previous_url: ajax/getting-started/radajax-advantages
7+
tags: telerik, aspnet, ajax, ajaxmanager, advantages
8+
published: True
9+
position: 1
10+
---
11+
12+
# AjaxManager Advantages
13+
14+
Using the AjaxManager control provides a number of benefits.
15+
16+
Among the many advantages for using the AjaxManager is that you don't need to make any changes to your existing applications, nor build new ones in some specific way so that they can be AJAX-enabled.
17+
18+
The AjaxManager uses the Microsoft ASP.NET AJAX engine to Ajaxify applications but eliminates the need of using numerous UpdatePanels, triggers, and so on.
19+
20+
The click-and-Go™ technology of the AjaxManager allows you to AJAX-enable any ASP.NET application without making any modification or writing a single line of code. For more information, refer to the article on [AJAX and Telerik AJAX]({% slug ajaxmanager/getting-started/what-is-ajax %}).
21+
22+
## Existing Applications
23+
24+
To AJAX-enable an existing application:
25+
26+
1. Add Microsoft ASP.NET AJAX to your project.
27+
28+
1. Drop an [AjaxManager]({%slug ajaxmanager/overview %}) to your form.
29+
30+
1. Define the AJAX relations by using a single dialogue in Visual Studio.
31+
32+
1. Press `F5` to run.
33+
34+
## New Applications
35+
36+
To AJAX-enable new applications, you don't have to follow any specific guidelines. Build a regular postback-based application the way you are used to and use the [AjaxManager]({%slug ajaxmanager/overview%}) to AJAX-enable it at the end.
37+
38+
39+
## AJAX-Enabling without the AjaxManager
40+
41+
When using Microsoft ASP.NET AJAX, the standard approach to AJAX-enable an application will require you to place `UpdatePanels` around each area that needs to be updated. This may introduce some challenges with preserving the application layout, that is, you need to figure out how to group the various elements.
42+
43+
Consider the following example: it begins as an ASP.NET web page that has a calendar, an email list, and a message body control. When the user selects a date from the calendar, the e-mails that are received that day are shown in the grid. Once an e-mail is selected, its content is displayed in the message body.
44+
45+
>caption Add three UpdatePanels to AJAX-enable a page with Microsoft ASP.NET AJAX
46+
47+
![UpdatePanels usage](images/Manager1_UpdatePanels.png)
48+
49+
In simple scenarios like the demonstrated one, placing `UpdatePanels` may not be very difficult. However, in real-life applications with dozens of UI controls that need to start working with AJAX, placing more than 20 `UpdatePanels` and figuring which element will go in the respective panel, may be a challenge even for the most advanced developers.
50+
51+
## AJAX-Enabling with the AjaxManager
52+
53+
The AjaxManager offers a fundamentally different approach for enabling AJAX on existing applications by dragging and dropping the control on your form and, then, setting the relations in a codeless way.
54+
55+
>caption The AjaxManager designer when the Smart Tag is clicked
56+
57+
![Ajax results](images/Manager1_Form.png)
58+
59+
Once the AjaxManager is placed on the form, you need to use its configuration dialog to define the which controls will initiate AJAX requests and which controls will be updated by each respective AJAX request, for example:
60+
61+
* "Message Body" UpdatePanel - Trigger 1: The needs to be updated when an **e-mail item** is clicked.
62+
63+
* "Message Body" UpdatePanel - Trigger 2: The needs to be updated when the **calendar** is clicked.
64+
65+
* "E-mail list" UpdatePanel - Trigger 1: The needs to be updated when the **calendar** is clicked.
66+
67+
The combination of these three relation triggers defines the two AJAX relations on the page, which are:
68+
69+
1. When the **calendar** is clicked, the **e-mail list** and the **message body** need to be updated.
70+
71+
1. When an **e-mail message** is clicked, only the **message body** needs to be updated.
72+
73+
As you can see, it is not very easy to figure out what will be the effect of the combination of triggers, especially when you have complex real-life application. Moreover, setting several triggers that facilitate each AJAX relation will need serious planning and something like a "Trigger diagram".
74+
75+
In contrast, the AjaxManager offers a centralized place where you can define and modify the AJAX relations on the page through the single configuration dialog in the Visual Studio .Net design-mode.
76+
77+
![Buld RadAjax Settings](images/Centralized_Management_of_AJAX_Relations_Pick2.png)
78+
79+
The logic for setting AJAX relations in the AjaxManager dialog brings about another benefit: the AJAX relations are defined in the same sequence in which users interact with the interface of the application.
80+
81+
## See Also
82+
83+
* [Adding the AjaxSettings Programmatically]({%slug ajaxmanager/how-to/add-ajaxsettings-programmatically%})

controls/ajaxmanager/appearance-and-styling/render-modes.md

-107
This file was deleted.

0 commit comments

Comments
 (0)