Disable AJAX with the AjaxManager When the Client Browser Does Not Support it
|Product||Progress® Telerik® UI for ASP.NET AJAX AjaxManager|
The Telerik RadAjax controls won't work in browsers that do not support
XmlHttpRequests. How can I disable AJAX when such a browser opens my website?
To disable AJAX, set the
EnableAJAX property of the Telerik AjaxManager or AjaxPanel control to
false both client- and server-side.
The .NET 2.0 framework provides the
SupportsXmlHttp property which you can use to check if the browser supports
Even though some browsers support
XmlHttpRequests, they can still return
SupportsXmlHttpproperty. In such cases, you need to define the browser definition files. For more information, refer to the Browser Definition File Schema (browsers Element) in MSDN and Browser Detection using ASP.NET articles.
The following example demonstrates how to achieve the desired scenario. When the check is over in the
Page_Load event handler, it will make your page work as if it was in a standard postback scenario for those browsers.
RadAjaxManager1.EnableAJAX = Page.Request.Browser.SupportsXmlHttp;
RadAjaxManager1.EnableAJAX = Page.Request.Browser.SupportsXmlHttp