Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the following snippet on my aspx page:

<td>
   <asp:DropDownList ID="ddlChildOrder" runat="server"></asp:DropDownList>
     
   <asp:Button ID="btnBullets" runat="server" Text="Bullets" />
   <asp:Button ID="btnLinks" runat="server" Text="Links" />
   <asp:Button ID="btnText" runat="server"  OnClick="btnText_OnClick" Text="Text" />
   <asp:Button ID="btnVideos" runat="server"   Text="Videos" />
   <ajx:ModalPopupExtender ID="ModalPopupVideo" PopupControlID="panelVideo"
                      TargetControlID="btnVideos" CancelControlID="btnCloseVideoPanel"
                      BackgroundCssClass="modalBackground" runat="server" />
</td>


and the panel it should popup is further down on the page:

asp:Panel Width="1500" Height="250" ID="panelVideo"  runat="server">
     <div class="modal-content">
        <div class="modal-header">
           <asp:Button ID="btnCloseVideoPanel" Text="X" CssClass="closeWin"  runat="server" />
     <h2>
       <asp:Label ID="lblTitle" Text="Videos" runat="server"></asp:Label>
     </h2>
     </div>
.....


why an I getting this error?
TargetControlID of '' is not valid. The value cannot be null or empty.

the property is assigned to an existing button., In fact intellisense for the property listed it as an option

What I have tried:

So much googling my brain hurts
Posted
Updated 1-Nov-18 5:46am
Comments
Vincent Maverick Durano 1-Nov-18 11:44am    
The code looks good to me. Do you have any other AJAX Control extenders somewhere in your page aside from ModalPopup?
RmcbainTheThird 1-Nov-18 12:07pm    
Yes that was the issue. For what ever reason I had inserted a validatorcalloutextender in my page that was not needed. but I was so focused on the popup thing Ihad my blinders on.

1 solution

Never mind the error is with
validatorcalloutextender
which I blindly pasted in to my code without understanding it's use
 
Share this answer
 
Comments
CHill60 2-Nov-18 7:07am    
And didn't include in the snippet you shared with us

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900