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

AJAXManager trying to find nonexistant UpdatePanel

6 Answers 108 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 17 Feb 2009, 03:23 PM
I have a RadAjaxManager that I'm trying to setup to AJAXify.  After I click the Button_SearchForCustomer button I get this error:

Sys.InvalidOperationException:  Could not find UpdatePanel with ID 'Label_CustomerNamePanel'.  If it is being updated dynamically then it must be inside another UpdatePanel.

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="Button_SearchForCustomer"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Label_Error" /> 
                    <telerik:AjaxUpdatedControl ControlID="Hidden_InitialSliderValue" /> 
                    <telerik:AjaxUpdatedControl ControlID="Label_CustomerName" /> 
                    <telerik:AjaxUpdatedControl ControlID="Button_SaveStatus" /> 
                    <telerik:AjaxUpdatedControl ControlID="Placeholder" /> 
                    <telerik:AjaxUpdatedControl ControlID="Div_Results" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="Button_SaveStatus"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="Label_Error" /> 
                    <telerik:AjaxUpdatedControl ControlID="Button_SaveStatus" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

 <div> 
        <asp:Label runat="server" AssociatedControlID="RadTextBox_Customer_ID" Text="TMS Customer ID:"></asp:Label> 
        <telerik:RadTextbox runat="server" 
            id="RadTextBox_Customer_ID"  
            EmptyMessage="tms id" 
            LabelCssClass="radLabelCss_Telerik" Skin="Telerik"  
            Width="125px"></telerik:RadTextbox> 
        <asp:Button runat="server" ID="Button_SearchForCustomer" Text="Lookup Customer" /> 
 
        <br /><br /> 
        <asp:Label runat="server" ID="Label_Error" CssClass="Error" /> 
 
        <div runat="server" id="Div_Results" style="padding-top:10px;"
            <asp:Label runat="server" ID="Label_CustomerName" CssClass="CustomerName" /> 
            <table> 
                <tbody> 
                    <tr> 
                        <td colspan="2" align="center"
                            <asp:Button runat="server" ID="Button_SaveStatus" Text="Save Credit Change" /> 
                        </td> 
                    </tr> 
                </tbody> 
            </table> 
        </div>        
 
        <br /> 
        <asp:PlaceHolder runat="server" ID="Placeholder" /> 
         

6 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 18 Feb 2009, 01:41 PM
Hello Bob,

Could you please elaborate a bit more on your scenario? Where is this code placed - in a web page, user control or master page? What is supposed to happen with Label_CustomerName after the Button_SearchForCustomer is clicked and what is the initial visibility status of the label?

If you could send us full code so we could test, would be great.

Looking forward your reply,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Bob
Top achievements
Rank 1
answered on 18 Feb 2009, 01:43 PM
The code is placed in a normal web page.

Label_CustomerName is initially invisible and has a text value of an empty string.  When the button is clicked, the label is set to visible and is given a text value.
0
Iana Tsolova
Telerik team
answered on 18 Feb 2009, 03:09 PM
Hello Bob,

Indeed, it is suggested that controls which are always visible on the page are added to the ajax settings pair. Can you try wrapping the label into a regular Panel and ajaxify it and see if it makes any difference?

1    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">    
2         <AjaxSettings>    
3             <telerik:AjaxSetting AjaxControlID="Button_SearchForCustomer">    
4                 <UpdatedControls>    
5                     <telerik:AjaxUpdatedControl ControlID="Label_Error" />    
6                     <telerik:AjaxUpdatedControl ControlID="Hidden_InitialSliderValue" />    
7                     <telerik:AjaxUpdatedControl ControlID="Panel_CustomerName" />    
8                     <telerik:AjaxUpdatedControl ControlID="Button_SaveStatus" />    
9                     <telerik:AjaxUpdatedControl ControlID="Placeholder" />    
10                     <telerik:AjaxUpdatedControl ControlID="Div_Results" />    
11                 </UpdatedControls>    
12             </telerik:AjaxSetting>    
13             <telerik:AjaxSetting AjaxControlID="Button_SaveStatus">    
14                 <UpdatedControls>    
15                     <telerik:AjaxUpdatedControl ControlID="Label_Error" />    
16                     <telerik:AjaxUpdatedControl ControlID="Button_SaveStatus" />    
17                 </UpdatedControls>    
18             </telerik:AjaxSetting>    
19         </AjaxSettings>    
20     </telerik:RadAjaxManager>    
 
<asp:Panel ID="Panel_CustomerName" runat="server">  
    <asp:Label runat="server" ID="Label_CustomerName" CssClass="CustomerName" />   
</asp:Panel> 

Let me know how it goes.

All the best,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Bob
Top achievements
Rank 1
answered on 18 Feb 2009, 04:45 PM
I took out any code that set the label to hidden so that it's always visible and also wrapped a normal panel around it.  Nothing helped - I'm still getting the same error.
0
Iana Tsolova
Telerik team
answered on 19 Feb 2009, 11:23 AM
Hi Bob,

I prepared a sample project for you following your scenario. Please check it out and let me know how it works on your end and what differs in your case.

Greetings,
Iana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Bob
Top achievements
Rank 1
answered on 19 Feb 2009, 04:35 PM
The problem was that I had the panel wrapped in a server side div which I was setting to hidden:
<div runat="server" id="test"
  <asp:Panel runat="server" ID="Panel_CustomerName"
                <asp:Label runat="server" ID="Label_CustomerName" CssClass="CustomerName" /> 
            </asp:Panel> 
  ...some other code... 
</div> 

Once I set that to visible I was able to use Ajax to update the label.  Instead of hiding the controls until I needed them I disabled them.
Tags
Ajax
Asked by
Bob
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Bob
Top achievements
Rank 1
Share this question
or