Click here to Skip to main content
14,691,039 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, I am using Modal popup extender to show a panel once I click on Button1 control as seen below. The code works fine.

However, instead of using Button1 control as a target (TargetControlID="Button1"), I want to use another control inside gridview, LbnInternDetail to show detail once a user click on it.

My question, how can I reference <asp:LinkButton button which is located inside a gridview
TargetControlID="GvName.Container(" XXXX ")   // not sure and do not know how 

Please help
<asp:Button ID="Button1" runat="server" Text="fill form" />
    <%--    code from 89 til 100 is modal popup--%>
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" 
        CancelControlID="btnCancel"
        TargetControlID="Button1" 
        PopupControlID="Panel1">
    </ajaxToolkit:ModalPopupExtender>

    <asp:Panel ID="Panel1" runat="server" CssClass="Popup" align="center" style = "display:none">
        <iframe style=" width: 350px; height: 200px;" id="irm1" src="changePwd.aspx" runat="server"></iframe>
        <br/>
        <asp:Button ID="Button2" runat="server" Text="Close" />
    </asp:Panel>
<asp:TemplateField HeaderText="Name " InsertVisible="false" SortExpression="internName">
    <ItemStyle />
    <ItemTemplate>
        <asp:LinkButton ID="LbnInternDetail"
            OnClick="InternDetail"
            Text='<%# DataBinder.Eval(Container.DataItem,"internName") %>'
            CommandArgument='<%# Eval("internId") %>'
            CommandName="select" 
            ForeColor="#8C4510" runat="server"
        >
        </asp:LinkButton>
    </ItemTemplate>
</asp:TemplateField>


What I have tried:

GvName.Container(" XXXX ")

not sure how
Posted
Updated 29-Apr-20 8:33am
v2

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