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
LVL 7
ayha1999Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Carl TawnConnect With a Mentor Systems and Integration DeveloperCommented:
In that case those RequiredFieldValidators and the ValidatorCalloutExtender need to be inside the UpdatePanel.
0
 
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
 
ayha1999Author Commented:
thank you so much for the help.

ayha
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.