开发者

An extender can't be in a different UpdatePanel than the control it extends asp.net

I am getting this error "An extender can't be in a different UpdatePanel than the control it extends". what could be the reason and 开发者_如何学编程how to tackle this problem.


You are using an AJAX ToolKit Extender Control to extend the functionality of one of your ASP.NET Controls. You have placed the Extender Control in a different UpdatePanel than the one the Extended Control resides in.

Both Extender and Extended controls must reside in the same UpdatePanel to avoid this exception.


Both Extender and Extended controls must reside in the same UpdatePanel to avoid the exception, this solved my problem.

I had an extra UpdatePanel that was giving this error, so I just had to remove the extra update panel lines of my aspx web page code.


What it says really - you've got an extender control that relates to a control that is in a different updatepanel. This means the extender is unable to act properly on the control it extends. You'll need to move your extender to be within the same updatepanel as the main control


In my case I was using button...outside the Update panel as below shown....

 <asp:Button ID="btnClub" runat="server" Text="Club" OnClick="btnClub_Click" />
 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>

I just solved it by putting the <asp:Button ID="btnClub" runat="server" Text="Club" OnClick="btnClub_Click" /> inside the
update Panel

          <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>

         <asp:Button ID="btnClub" runat="server" Text="Club" OnClick="btnClub_Click" />
Here you make your panel code
     </ContentTemplate>
            </asp:UpdatePanel>


Reason :Your iD is mis matching Ex:Text box id or dropdown id mismatch in Calender extender or RequiredFieldValidator

Ex: Hear Id Value And Target Control Id Must Match .....


Check for controls with extenders that are have the same ID especially if you copy pasted from another form


Hi I got the solution of my problem by myself. The problem occurred when the target control id of the extender control was different from the control it had extend inside update panel. I resolved this proble a long time back and replying now.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜