AJAX manager not working
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!"; 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