RadAjaxManager & Co F4.0

2 posts, 0 answers
  1. Jean-Yves
    Jean-Yves avatar
    69 posts
    Member since:
    Feb 2009

    Posted 03 Feb 2010 Link to this post

    Hello,

    I just begin a new project on the framework 4.0.
    And my AJAX is not working at all and I don't understand why. May be I forgot an important step... But I don't see where.

    So, it's easy, I have 1 masterPage and 1 page.

    In the master page : 
        <telerik:RadScriptManager id="RadScriptManager1" runat="server">  
        <Scripts>  
                <asp:ScriptReference assembly="Telerik.Web.UI" name="Telerik.Web.UI.Common.Core.js" />  
                <asp:ScriptReference assembly="Telerik.Web.UI" name="Telerik.Web.UI.Common.jQuery.js" />  
            </Scripts>  
        </telerik:RadScriptManager>  
              
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings>  
                <telerik:AjaxSetting AjaxControlID="RadTextBoxRecherche" EventName="RadTextBoxRecherche">  
                    <UpdatedControls>  
                        <telerik:AjaxUpdatedControl ControlID="DivContent" />  
                        <telerik:AjaxUpdatedControl ControlID="DivRecherche" />  
                    </UpdatedControls>  
                </telerik:AjaxSetting>  
            </AjaxSettings>  
        </telerik:RadAjaxManager>  
                              
        <telerik:RadAjaxLoadingPanel id="RadAjaxLoadingPanel1" runat="server" />  
      
        <telerik:RadTextBox ID="RadTextBoxRecherche" runat="server" Width="230px" Height="25px" 
                        EmptyMessage="...Rechercher" EmptyMessageStyle-Font-Size="Medium" Font-Size="Medium"   
                        ontextchanged="RadTextBoxRecherche_TextChanged"
                            <EmptyMessageStyle HorizontalAlign="Right" Font-Size="Medium"></EmptyMessageStyle> 
                            <ReadOnlyStyle HorizontalAlign="Right"></ReadOnlyStyle> 
                            <FocusedStyle HorizontalAlign="Right"></FocusedStyle> 
                            <DisabledStyle HorizontalAlign="Right" /> 
                            <InvalidStyle HorizontalAlign="Right"></InvalidStyle> 
                            <HoveredStyle HorizontalAlign="Right"></HoveredStyle> 
                            <EnabledStyle HorizontalAlign="Right" /> 
                    </telerik:RadTextBox> 
     
     <asp:ContentPlaceHolder ID="ContentPlaceHolderContent" runat="server">  
     </asp:ContentPlaceHolder>  
      
    <div id="DivContent" runat="server">  
    Test 1  
    </div>  
      
    <div id="DivContent" runat="server">  
    Test 2  
    </div>  

    and 

    protected void RadTextBoxRecherche_TextChanged(object sender, EventArgs e) 
            { 
                if (!String.IsNullOrWhiteSpace(RadTextBoxRecherche.Text)) 
                { 
                    gestionRecherche(true); 
                } 
                else 
                { 
                    gestionRecherche(false); 
                } 
            } 
     
            private void gestionRecherche(bool b) 
            { 
                DivContent.Visible = !b; 
                DivRecherche.Visible = b; 
            } 


    And in the page : 
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadTextBoxSociete"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="ImageSocieteGood" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManagerProxy> 
     
    <telerik:RadTextBox ID="RadTextBoxSociete" runat="server" OnTextChanged="RadTextBoxSociete_TextChanged" AutoPostBack="true"></telerik:RadTextBox> 
                            <asp:Image id="ImageSocieteGood" runat="server" ImageUrl="/Images/fam/good.png" Visible="false" /> 
                            <asp:Image id="ImageSocieteError" runat="server" ImageUrl="/Images/fam/error.png" Visible="false" /> 

    and 
    protected void RadTextBoxSociete_TextChanged(object sender, EventArgs e) 
            { 
                ImageSocieteGood.Visible = true
            } 


    So, as you see it's very simple situations.
    But both don't work... and I don't know why.

    Thank you
  2. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 04 Feb 2010 Link to this post

    Hi Jean-Yves,

    The problem you are facing is most probably related to the one discussed in this forum thread.

    Best wishes,
    Pavel
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Back to Top