Al

Al

  • NA
  • 30
  • 6.2k

calling popup window from within a button in gridview

May 7 2020 6:56 AM
Hi, 
 
I have creaed a popup once I click on a button, pupup will show with list of items for user to view.
This works fine. Now, I want  to create similar button inside gridview  , once user click on a button in gridview. it will  show hte popup . So my question how can I reference  TargetControlId to point to a button control inside Gridview .
please advise, 
 
<div>
<asp:Button ID="Button1" runat="server" Text="fill form" />
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
CancelControlID="Button2"
TargetControlID="Button1"
PopupControlID="Panel1">
</ajaxToolkit:ModalPopupExtender>
<asp:Panel ID="Panel1" runat="server" CssClass="Popup" align="center" Style="display: none">
<iframe style="width: 400px; height:280px; background-color:white;" id="irm1"
scrolling="no" src="popUpDoc.aspx" runat="server"></iframe>
<br />
<asp:Button ID="Button2" runat="server" Text="Close" />
</asp:Panel>
</div>
 

Answers (1)