How to display image in popup on Button click event?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manish Kumar ChoudharyPosted Dec 22, 2014, 5:27 AM
.aspx file:
CancelControlID="btnClose" BackgroundCssClass="modalBackground"> </cc1:modalpopupextender> <asp:panel id="Panel1" runat="server" cssclass="modalPopup" align="center" style="display:none" xmlns:asp="#unknown"> This is an ASP.Net AJAX ModalPopupExtender Example <asp:image id="img1" runat="server"> ImageUrl='~/Image/abc.jpg'></asp:image> <asp:button id="btnClose" runat="server" text="Close" /> </asp:panel>
.aspx.cs file: (Button Click Event)
void Btn_Click(Object sender, EventArgs e)
{
mp1.show(); // Model popup id .show function is to open poup on button click event
}
Manish Kumar ChoudharyPosted Dec 22, 2014, 11:10 PM
Modify the above code you can do that also. Assign image path dynamically then it will work.Dhruvi kukadiyaPosted Dec 22, 2014, 11:01 PM