Solved

Update Panel Update error

Posted on 2011-03-09
4
434 Views
Last Modified: 2012-05-11
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
Comment
Question by:ayha1999
  • 2
  • 2
4 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 35083466
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
 
LVL 7

Author Comment

by:ayha1999
ID: 35083530
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
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 250 total points
ID: 35083562
In that case those RequiredFieldValidators and the ValidatorCalloutExtender need to be inside the UpdatePanel.
0
 
LVL 7

Author Closing Comment

by:ayha1999
ID: 35084380
thank you so much for the help.

ayha
0

Featured Post

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question