AjaxUpdatedControl making async callbacks?

2 posts, 0 answers
  1. Mike Dugan
    Mike Dugan avatar
    8 posts
    Member since:
    Aug 2006

    Posted 01 Nov 2008 Link to this post

    I ran into a bit of an unexpected issue, and I am curious if there is an elegant way around it. Basically, if you add a button as an AjaxUpdatedControl, clicking on that button will now cause async postbacks, and I still want it to do a full, regular postback. Is there a way to make this happen?

    Simple example with dropdownlist and button below. Click on the button, and examine the console in Firebug to verify.
    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %> 
    <%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"
    <head runat="server"
        <form id="form1" runat="server"
        <asp:ScriptManager ID="ScriptManager1" runat="server"
            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
                <asp:ListItem Value="test">Test</asp:ListItem> 
        <asp:Button ID="Button1" runat="server" Text="Button" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
                <telerik:AjaxSetting AjaxControlID="DropDownList1"
                        <telerik:AjaxUpdatedControl ControlID="Button1" /> 

    using System; 
    using System.Collections.Generic; 
    using System.Linq; 
    using System.Web; 
    using System.Web.UI; 
    using System.Web.UI.WebControls; 
    public partial class _Default : System.Web.UI.Page  
        protected void Page_Load(object sender, EventArgs e) 
        protected void Button1_Click(object sender, EventArgs e) 
            string test = "test if we do a full postback"
        protected void Page_PreRender(object sender, EventArgs e) 
            this.Button1.Text = this.DropDownList1.Text; 

  2. Yavor
    Yavor avatar
    11 posts

    Posted 04 Nov 2008 Link to this post

    Hi Mike,

    Can you please elaborate a little bit on your setup- why do you need to perform a full page postback? Are you looking to update another control, the button itself, or is there a way in which the ajaxified control is misbehaving? This will help me better address the question at hand.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top