tags:

views:

375

answers:

3

In my application, a user clicks a "save" button and is then presented with a MsgBox confirmation simply stating "Are you sure you want to save?", or something along those lines.

It's been hit or miss, but occasionally, this MsgBox will load behind the browser rather than be the center of attention with focus. How can I stop this from happening?

Thanks in advance :)

A: 

Are you talking about javascript message box?

dev.e.loper
Dim Answer As MsgBoxResult = MsgBox("Are you sure you wish to save?", MsgBoxStyle.YesNo, "Save?")
+1  A: 

If you are using ASP.NET WebForms and it is an intranet app, have you looked at using the ASP.NET AJAX ModalPopup control? Thay way you don't really have a 2nd window.

RichardOD
A: 

The dode to add a simle JavaScript confirmation diagog in code behind ...

 buttonSaveId.Attributes.Add("OnClick" , "return (confirm('Do you really want to save ?! '));"
YordanGeorgiev