This is a migrated thread and some comments may be shown as answers.

Late merge between RadAjaxProxy and RadAjaxManager

3 Answers 74 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Aleksandar
Top achievements
Rank 1
Aleksandar asked on 08 Oct 2008, 09:21 AM
I am in a process of replacing RadAjax from Telerik.WebControlls with RadAjax from new Telerik.Web.UI framework in one of my projects. Very painfull...

Some issues:
-$find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("content"); trows error when on user control and called from any flavor of RegisterStartupScript,
-Situation: Master Page with the following code
<%@ Master Language="VB" CodeFile="TempMasterPage.master.vb" Inherits="TempMasterPage" %> 
<%@ 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">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">      
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">  
    </telerik:RadAjaxManager> 
MasterPage  
        <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">          
        </asp:contentplaceholder> 
        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">  
            <script type="text/javascript">  
                function PageAjax()  
                    {  
                        var objAjax1=$find("<%=RadAjaxManager1.ClientID%>");  
                        alert(objAjax1);  
                        var objAjax2=$find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>")  
                        alert(objAjax2);  
                    }      
            </script>          
        </telerik:RadScriptBlock>      
    </form> 
</body> 
</html> 
 
Both, first and second alert give [null] as result instead of [object]. I call function PageAjax from user controll. Why is function not finding propper RadAjax object?

-Situation: Master page with RadAjax and ScriptManager. Blank page using master page with only one custom controll on it. Custom controll with one asp:Panel, RadAjaxProxy, AjaxLoadingPanel, RadMenu (from old Rad Controlls for ASP.NET) and JS function ClickMenuButton, invoking Click event on menu. RadAjaxProxy set to PostBack asp:Panel on Menu item Click event. If I invoke function ClickMenuButton from OnLoad script, it does not show AjaxLoadingPanel. When I do that by clicking on menu btton, it works fine... Mistery for me and another meny hours gone for nothing. Any explanation for this behavior?

Regards,
Alex

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 13 Oct 2008, 06:11 AM
Hello Aleksandar,

Can you please post the complete declaration of the project (other pages as well), so that I can try to recreate the sample, and advise you further on the setup.

Kind regards,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Aleksandar
Top achievements
Rank 1
answered on 13 Oct 2008, 06:44 AM
Hi Yavor,
Explanation sits at the bottom of the following post:
http://www.telerik.com/community/forums/thread/b311D-bgkege.aspx
But if you want to test this code just save it as master page and create blank aspx page using that master page. OnLoad, you will get errors I am talking about.
Your previous implementation of AJAX was fine with this code, but your implementation of MS Ajax is not.

Regards,
Alex
0
Yavor
Telerik team
answered on 15 Oct 2008, 12:48 PM
Hello Aleksandar,

I tested the setup, and the control behaved as expected.
Attached to this message, is the sample code, which I used for testing.
Let me know if I am leaving something out.

Greetings,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Aleksandar
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Aleksandar
Top achievements
Rank 1
Share this question
or