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

Ajax manager does not appear to be posting back

0 Answers 33 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Phillip asked on 14 Jun 2012, 01:46 AM
I have a master page that has the script manager on it.
I have a content page that has the follow RadajaxManager and Panels

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">
<!-- Loading Panel -->
<telerik:RadAjaxLoadingPanel ID="DefaultAjaxLoadingPanel" runat="server" Skin="Default">
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="0"
    Skin="" Transparency="30" BackColor="#CCCCCC">
    <div id="MyLoadingPanel">
        <span class="WbHeader">Configuring Document...</span><br />
        <asp:Image ID="LoadingImage" runat="server" ImageUrl="~/images/ajax-loader.gif"></asp:Image>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" MinDisplayTime="0"
    Skin="" Transparency="30" BackColor="#CCCCCC">
    <div id="Div1">
        <span class="WbHeader">Restructuring Document...</span><br />
        <asp:Image ID="Image1" runat="server" ImageUrl="~/images/ajax-loader.gif"></asp:Image>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel3" runat="server" MinDisplayTime="0"
    Skin="" Transparency="10" BackColor="#CCCCCC" ZIndex="2000">
    <div id="Div3" style="margin: 50px 10px 10px 10px; text-align: left">
        <span class="WbHeader">The document outline view is disabled while you are editing this
            particular content block. When you have finished and saved your work, this view
            will refresh to reflect your changes.</span>

The RadAjaxManager is called from javascript that is initiated by a RadTree OnClientNodeClicking

<div id="MainDiv" style="height:100%;width:100%;overflow:auto;">
        <telerik:RadSplitter ID="rsMain" runat="server" VisibleDuringInit="True" Height="100%" Width="100%" AccessKey="o" style="overflow: auto;">
            <telerik:RadPane ID="pOutline" runat="server" Width="26%" CssClass="VisibleScrollbar">
            <telerik:RadTreeView ID="OutlineTree" runat="server" AccessKey="w" CausesValidation="False"
                EnableDragAndDrop="True" EnableDragAndDropBetweenNodes="True" WebServiceSettings-Path="/wbTree.asmx"
                OnClientNodePopulated="ClientNodePopulated" Height="99%"
                <WebServiceSettings Method="LoadNodes" Path="/wbTree.asmx"></WebServiceSettings>
                    <telerik:RadTreeViewContextMenu ID="ElementMenu" runat="server" EnableAutoScroll="True">
                <ExpandAnimation Type="None" />
            <telerik:RadSplitBar ID="RadSplitBar1" runat="server" />
            <telerik:RadPane ID="pContent" runat="server" Width="74%">
                <telerik:RadAjaxPanel id="plEdit" runat="server" EnableAJAX="True" Width="99%"
                    LoadingPanelID="DefaultAjaxLoadingPanel"  ClientEvents-OnResponseEnd="plEditResponseEnd"
                    <asp:HiddenField ID="SelectedIID" Value="0" runat="server" />
                    <telerik:RadSpell ID="RadSpell1" runat="server" IsClientID="True" ButtonType="None" EnableViewState="False"  />                          
                    <asp:Button ID="NextButton" runat="server" Visible="false" Text="Next" CausesValidation="false" EnableViewState="false"/>

//Called when you are attempting to click a node on the tree.
function ClientNodeClicking(sender, args) {
    var Node = args.get_node();
    var attrs = Node.get_attributes();
    var ClickStatus = attrs.getAttribute("ClickStatus");
    var IID = attrs.getAttribute("IID");
    if (ClickStatus != null) {
        if (ClickStatus == "None") {
    if (IID == null || IID == "") {
    Page_ValidationActive = false;
    var _ajax = $find("<%=RadAjaxManager1.ClientID %>");
    if (_ajax != null) {
        var CmdStr = "IID=" + IID;
        _ajax.ajaxRequestWithTarget("<%= plEdit.ClientID %>", CmdStr);

The ClientIDs and CmdStr are properly assigned (attached ClickedValues).

I also have a server side method that overrides the RaisePostbackEvent which I would expect to get called but does not.

Protected Overrides Sub RaisePostBackEvent(ByVal source As IPostBackEventHandler, ByVal eventArgument As String)
       MyBase.RaisePostBackEvent(source, eventArgument)
       If TypeOf source Is RadAjaxPanel Then
           ''No, there is no tree!
           If MyTree Is Nothing Then
               Exit Sub
           End If
           If eventArgument.Contains("IID=") Or eventArgument.Contains("Refresh") Then
               ''Slight Hack for multi-page wizard controls
               Session("_CurrentWizardPage") = 0
               If _NodeTransformed = True Then
                   RadAjaxManager1.ResponseScripts.Add(String.Format("ServerSideRefreshNode('{0}');", SelectedIID.Value))
               End If
           End If
           If eventArgument.Contains("IID=") Then
               Dim _NodeStr As String = eventArgument.Substring(eventArgument.LastIndexOf("=") + 1)
               If SelectedIID.Value <> _NodeStr Then
                   _NodeStr = _NodeStr
                   SelectedIID.Value = _NodeStr
                   BuildControls(_NodeStr, True)
               End If
           End If
           If eventArgument.Contains("Refresh") Then
               BuildControls(SelectedIID.Value, True)
           End If
           If eventArgument.Contains("SaveFile") Then
               ''Do nothing technically. We've already done the binding to the XML document in the postback at this point.
           End If
           If eventArgument.Contains("SaveWithValidation") Then
           End If
           If eventArgument.Contains("ValidationOnly") Then
           End If
           _NodeTransformed = False
       End If
   End Sub

This is a web application (Not Web site).  I have an application level function for logging errors and nothing is being caught, No javascript error is being received nor is any IIS error being logged in the event viewer.  It appear that processing is simply stopping.

Any suggestions as to why this would not be working would be appreciated.

No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question