add delete icon to confirmation popup
I have an ASP.NET record (in a grid view) like this:
<ItemTemplate>
<asp:ImageButton ID="btnSearchDeleteProperty" runat="server" ImageUrl="~/Images/delete2.png"
OnClientClick="return confirm ( 'Are you sure you want to DELETE this record?' )" CommandArgument='<%# Eval("PropertyID") %>'
OnCommand="_SearchDeletePropertyBtn_Command" ToolTip="Delete property" />
</ItemTemplate
>
Of course, it appears that confirmation popup:
Well, do you know a way to add a开发者_JAVA百科 DELETE image on the left side of the popup? I remember in old visual basic 6, for application desktop there were these kind of popups:info, delete etc.
Is there a way to call the delete one here?
You're going to need to create your own confirm dialog, because the standard confirm dialog will not let you add anything to it.
Take a look at jQuery UI dialog:
http://jqueryui.com/demos/dialog/
no, you can't, unfortunately. What you can do is create your own dialog boxes from HTML and have your image there (better than using confirm() or alert() imo), but other then that you cannot.
精彩评论