Well, those built in dialog boxes (for reasons of security) tend to spit out your web url. Now, of course when you publish to a real production site - with a domain name, then that local host text will show as your URL.
However, at the end of the day? They look quite bad - and don't allow you any customizing.
So, I suggest you find and adopt a nice "dialog" box. There are boatloads of them on the internet, but the real problem is which one to pick and use?
I tend to think going with say the most popular one, and also the one that is the "least" efforts on your part.
For asp.net web pages? I suggest two possibilities that are really nice.
If you already using the AjaxToolkit, then it has a very nice pop dialog add-in, and I used that one in the past quite a bit.
Next choice? a lot suggest bootstrap ones, but I find them really difficult to work with, but that's a possible.
And my current favorite choice? Well, 99% of web sites - even for about 10 years now for asp.net web forms? You have and will use jQuery. It is installed by default, so I suggest you add in jQuery.UI. It has a bunch of great options like sliding panels and "accordions", and has a REALLY nice dialog box.
Edit:
Here is a example of how one looks:
Say we have this grid view with a delete button
So, our delete button in the grid view is this:
So, if we click on that button, then the confirm dialog pops up - the default built in one. As above shows - not very pretty at all.
And the code behind for that delete button is quite simple:
Protected Sub cmdDelete_Click(sender As Object, e As EventArgs)
Dim btn As LinkButton = sender
Dim gRow As GridViewRow = btn.NamingContainer
Dim PKID As Integer = GridView1.DataKeys(gRow.RowIndex).Item("ID")
Dim strSQL As String = "DELETE FROM tblHotels WHERE ID = " & PKID
Using conn As New SqlConnection(My.Settings.TEST4)
Using cmdSql As New SqlCommand(strSQL, conn)
conn.Open()
cmdSql.ExecuteNonQuery()
End Using
End Using
LoadGrid()
End Sub
Now, lets do the same with jQuery.UI dialog.
The button code becomes this:
Once again, like all asp.net buttons - if the onclientclick returns true, then the button runs, else if we return false, the button does not fire (run server side code behind).
So, with jQuery.UI, we use a div for the popup, and have this div and code now:
Now, when I hit delete button, the dialog is custom - and very nice:
And it even "darkens" the rest of the screen. So, consider grabbing a dialog utility. There are number, but the above is a jQuery.ui example to give you an idea of what they look like.
Regards,
Albert D. Kallal (Access MVP 2003-2017)
Edmonton, Alberta Canada