AJAX manager not working

Posted by Community Admin on 04-Aug-2018 13:07

AJAX manager not working

All Replies

Posted by Community Admin on 19-Nov-2014 00:00

I'm  trying to create AJAX enabled usercontrols but I can't get the AJAX manager to work at all in my website (Sitefinity v. 7.2) even in the simples case. I have copied exactly the example from this page:

www.telerik.com/.../ajax-controls-in-ajaxpanel-and-ajaxsettings.html

I've configured the page to include the script manager and also enabled the viewstate.  But even with the simple code in the example I always get a full page reload when pressing the button. Am I missing something? Here is the code I'm using (tried with both RadAjaxManager and RadAjaxManagerProxy, but there are no other RadAjaxManager instances on the page):

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AjaxTestControl.ascx.cs" Inherits="MySite.CustomControls.AjaxTestControl" %>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Button1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Panel1" />
                <telerik:AjaxUpdatedControl ControlID="Label1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<asp:Panel ID="Panel1" runat="server">
    <asp:Button ID="Button1" runat="server" Text="Update Button" OnClick="Button1_Click" />
    <asp:TextBox ID="TextBox1" runat="server" Text="Update me"></asp:TextBox>
</asp:Panel>
<asp:Label ID="Label1" runat="server">Me too</asp:Label>
 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace MySite.CustomControls
    public partial class AjaxTestControl : System.Web.UI.UserControl
    
        protected void Page_Load(object sender, EventArgs e)
        
 
        
 
        protected void Button1_Click(object sender, EventArgs e)
        
            TextBox1.Text = "Updated!";
            Label1.Text = "Updated too!";
        
    

Posted by Community Admin on 24-Nov-2014 00:00

Hello Alessio,

What I can suggest to test on your side is to declare the RadScriptManager in your master page template and test the behavior again.

Another option will be to use the SitefinityUpdatePanel and wrap the controls or use ASP UpdatePanel. You may take a look at the following resources for more details using the SitefinityUpdatePanel:

Using Update Panel in Sitefinity
Using Update panel in Sitefinity - Part 2

Regards,
Sabrie Nedzhip
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed