In ASP.Net I am using an ImageButton
on click of which I am showing JavaScript
confirm
button like below:
<asp:ImageButton ID="imageButtonDelete" ImageUrl="~/Styles/images/delete.png" CommandArgument='<%#Eval("regionId") %>' OnClientClick="javascript:return confirm('Are you sure you want to delete?');" Text="Delete" CommandName="Delete" runat="server" Width="20px" Height="20px" />
However, in Chrome, the title of the alert box shows -
the page at localhost:1150 says
I don't want the page at...
text. How to change that?
Sorry, but you can't it's a security/anti-phishing feature, Refer this link for more information change alert title
However, if you want to display a box to the user then you can construct such box through jquery modal. Here is a nice link which shows how to create it jquery-modal
This should not be specific to ASP.net, but specific to the browser.
You may use some JavaScript library like jQuery Alert, etc. for generating a JavaScript confirm box which would work in a similar way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With