user2380844
user2380844

Reputation: 307

How to change the title of javascript alert box in asp.net?

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?

Upvotes: 5

Views: 2614

Answers (2)

Saumil
Saumil

Reputation: 2517

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

Upvotes: 2

Vivek Jain
Vivek Jain

Reputation: 3889

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.

Upvotes: 1

Related Questions