troubleshooting Question

ModalPopUpExtender in a GridView

Avatar of ken_rgr
ken_rgr asked on
Microsoft DevelopmentASP.NETAJAX
3 Comments1 Solution610 ViewsLast Modified:
I am using ModalpopExtender to show  a popup window when the user clicks on the one of the Row.

I dont know where I am doing mistake Its not working for me .

I am getting error TargetControlId is not found.

I am using VS2008 with C#

Here is my code.
Thanks in Advance
<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
 
<asp:GridView ID="MyTable"  AllowPaging="false" AutoGenerateColumns="false" runat="server">
    <Columns>
        <asp:TemplateField>           
            <ItemTemplate>
                <a href='http:\\www.yahoo.com' id="lnkName"><%=Name%></a>
               <cc1:ModalPopupExtender ID="ModalPopup1" runat="server" TargetControlID="lnkName"
                PopupControlID="pnlpopup" BackgroundCssClass="modalBackground" DropShadow="true"
                OkControlID="btnYes" CancelControlID="CancelBtn" />           
              <asp:Panel ID="pnlpopup" runat="server" CssClass="modalPopup" Style="display:none"
                Width="278px" Font-Names="@MS PGothic">
    Hi Would you like to Take a survey    
                <asp:Button ID="btnYes" runat="server" Text="Yes" />                
                <asp:Button ID="CancelBtn" runat="server" Text="Cancel" Width="52px" />
            </asp:Panel>
            </ItemTemplate>
        </asp:TemplateField>            
    </Columns>
</asp:GridView>
ASKER CERTIFIED SOLUTION
CtrlAltDl

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros