• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 447
  • Last Modified:

Update Panel Update error

I have the following update update panel and textbox control in a asp.net 4.0 webform. when I try to update the updatepanel I get an error "An extender can't be in a different UpdatePanel than the control it extends." How can I solve the problem? the error occurs when I issue the follwoing command.

 up2.Update();

<asp:UpdatePanel ID="up2" runat="server" UpdateMode="Conditional"><ContentTemplate><asp:TextBox ID="txtName" runat="server" Height="22px" Width="346px" ClientIDMode="Static"></asp:TextBox></ContentTemplate></asp:UpdatePanel>

ayha
0
ayha1999
Asked:
ayha1999
  • 2
  • 2
1 Solution
 
Carl TawnSystems and Integration DeveloperCommented:
Well the error would suggest you have an extender somewhere in your page that is associated with one of the controls in that update panel.
0
 
ayha1999Author Commented:
there is one requiredfieldvalidator associated with txtName.

<asp:RequiredFieldValidator ID="rf2" runat="server"
<asp:RequiredFieldValidator ID="rf1" runat="server"
                            ControlToValidate="txtName" Display="None"
                            ErrorMessage="Name is required."></asp:RequiredFieldValidator>
                        <asp:ValidatorCalloutExtender ID="rf1_ValidatorCalloutExtender"
                            runat="server" Enabled="True" TargetControlID="rf1">
                        </asp:ValidatorCalloutExtender>
0
 
Carl TawnSystems and Integration DeveloperCommented:
In that case those RequiredFieldValidators and the ValidatorCalloutExtender need to be inside the UpdatePanel.
0
 
ayha1999Author Commented:
thank you so much for the help.

ayha
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now