Fire AJAX Server event on TextChanged.

4 posts, 1 answers
  1. Paul Buxton
    Paul Buxton avatar
    39 posts
    Member since:
    Jan 2007

    Posted 01 Jul 2009 Link to this post


    i'm trying to do the following.....

    I want to validate a username is unique from a RadTextBox and handle TextChanged which calls the database.  What I subsequently need to do is get the client to display a radalert or a radwindow to display saying the name is already in use.

    I have a RadAjaxManager, and enabled the textbox within it.

    In textchanged handler I try to inject a radalert

    RadAjaxManager1.ResponseScripts.Add("radalert('UserName is already in use!')");

    but it never displays.

    Is this something that is possible, or not?


  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 02 Jul 2009 Link to this post

    Hello Paul Buxton,

    I tried the scenario and it is working fine in my side. Have you placed ScripManager/RadScriptManager before the RadAjaxManager markup?

    Here is the code that I tried. Have a look on this:
    <telerik:RadScriptManager ID="RadScriptManager2" runat="server"
    <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server"
            <telerik:AjaxSetting AjaxControlID="TextBox1"
                    <telerik:AjaxUpdatedControl ControlID="TextBox1" /> 
    <telerik:RadWindowManager ID="RadWindowManager2" runat="server"
    <asp:TextBox ID="TextBox1" runat="server" OnTextChanged="TextBox1_TextChanged"

    protected void TextBox1_TextChanged(object sender, EventArgs e) 
        RadAjaxManager1.ResponseScripts.Add("radalert('UserName is already in use!');"); 

  3. DevCraft R3 2016 release webinar banner
  4. Paul Buxton
    Paul Buxton avatar
    39 posts
    Member since:
    Jan 2007

    Posted 10 Jul 2009 Link to this post

    The simplest things are the solution.  I never even realised I'd got the script manager after then manager.  I never realised it mattered.

  5. Bijoy Mohanta
    Bijoy Mohanta avatar
    6 posts
    Member since:
    Dec 2014

    Posted 16 Mar Link to this post

    01.<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server" ValidateRequestMode="Enabled">
    02.        <AjaxSettings>
    03.             <telerik:AjaxSetting AjaxControlID="txtDeclinedByPin">
    04.                <UpdatedControls>
    05.                    <telerik:AjaxUpdatedControl ControlID="txtDeclinedByPin" />
    06.                    <telerik:AjaxUpdatedControl ControlID="txtDeclinedByName" />
    07.                    <telerik:AjaxUpdatedControl ControlID="txtDeclinedByDesignation"/>
    08.                </UpdatedControls>
    09.            </telerik:AjaxSetting>
    10.        </AjaxSettings>
    11.    </telerik:RadAjaxManagerProxy>
    14.For control:
    15.<telerik:RadNumericTextBox runat="server" ID="txtDeclinedByPin" OnTextChanged="txtDeclinedByPin_TextChanged1" AutoPostBack="true"></telerik:RadNumericTextBox>
    hi experts this is the solution on TextChanged Event with ajaxifying
Back to Top