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

RadAjaxManager error when deploying website

1 Answer 156 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Chris LaFrancis
Top achievements
Rank 1
Chris LaFrancis asked on 30 Apr 2010, 06:52 PM
First, if this is posted multiple times I appologize, it didn't seem to go through before.
I have a website that works fine on my development pc but when I deploy it to the webserver I get the following error: BC30456: 'RadAjaxManager1_AjaxRequest' is not a member of 'ASP.default_aspx'.
Here is my Radajaxmanager code on the default.aspx page:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"   
        DefaultLoadingPanelID="RadAjaxLoadingPanel1">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="GrdPoints" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="GrdPoints">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="GrdPoints" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="GrdGroups">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="GrdGroups" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="GrdThirdParty">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="GrdThirdParty" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
This is the code on the code behind page:
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As ObjectByVal e As AjaxRequestEventArgs)  
        Dim values As String = e.Argument  
        Dim array() As String 
        array = values.Split(",")  
        pointsLowerLimit = CInt(array(0))  
        pointsUpperLimit = CInt(array(1))  
        UpdatePointsLimits(pointsLowerLimit, pointsUpperLimit)  
        UpdatePointsHiddenFields(pointsLowerLimit, pointsUpperLimit)  
        For Each item As GridDataItem In GrdPoints.Items  
            Dim pReceipt As Single = CSng(item("percentOfOperationalNominatedForReceiptRole").Text)  
            Dim pDelivery As Single = CSng(item("percentOfOperationalNominatedForDeliveryRole").Text)  
            Dim imgR As Image = TryCast(item.FindControl("receiptPercent"), Image)  
            Dim imgD As Image = TryCast(item.FindControl("deliveryPercent"), Image)  
            imgR.ImageUrl = setIndicatorURL(pointsLowerLimit, pointsUpperLimit, pReceipt)  
            imgD.ImageUrl = setIndicatorURL(pointsLowerLimit, pointsUpperLimit, pDelivery)  
        Next 
 
    End Sub 
This is the Javascript that calls the ajaxmanager when a radwindow closes:
function OnClientClose(oWnd, args) {  
             //get the transferred arguments  
             var arg = args.get_argument();  
             if (arg) {  
                 var pointLimits = new Array();  
                 pointLimits[0] = arg.lowerLimit;  
                 pointLimits[1] = arg.upperLimit;  
                 var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");  
                 ajaxManager.ajaxRequest(pointLimits); // invoke ajaxRequest explicitly   
             }  
         } 
I would appreciate any help I can get on this to get it to work on the webserver.
Thank you.

1 Answer, 1 is accepted

Sort by
0
Chris LaFrancis
Top achievements
Rank 1
answered on 03 May 2010, 11:48 PM
Never mind, I figured out my issue. I had to add the Handles RadAjaxManager1.AjaxRequest at the end of my Sub so it ended up like this:

Protected

 

Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs) _

 

 

    Handles RadAjaxManager1.AjaxRequest

 

Tags
Ajax
Asked by
Chris LaFrancis
Top achievements
Rank 1
Answers by
Chris LaFrancis
Top achievements
Rank 1
Share this question
or