Victor Charles
asked on
Help with placing focus on button in message box
Hello,
I am using the code below for users to decide Yes/No, is there a way to place the focus on No automatically and they would only need to press Enter or Click on it? Below is the code I am using.
Dim anadd As String
anadd = MsgBox("Are you sure you want to Add this record?", MsgBoxStyle.YesNo, "Warning before Attempting Adding record")
If anadd = MsgBoxResult.Yes Then
code is executed.....
I am using ASP.NET
Thanks,
Victor
I am using the code below for users to decide Yes/No, is there a way to place the focus on No automatically and they would only need to press Enter or Click on it? Below is the code I am using.
Dim anadd As String
anadd = MsgBox("Are you sure you want to Add this record?", MsgBoxStyle.YesNo, "Warning before Attempting Adding record")
If anadd = MsgBoxResult.Yes Then
code is executed.....
I am using ASP.NET
Thanks,
Victor
You will have to use Messagebox.Show as I believe msgbox does not accept this parameter
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank You!
My pleasure. Thanks for asking!
Here is an example:
Open in new window