msgbox

J

Jennyfer J Barco

Hello I need in my VB code behind to ask a question and do some action is
the user selects Yes or No bottom. I have

mystr = System.Windows.Forms.MessageBox.Show("Are you sure to delete the
records?", "WDS", Windows.Forms.MessageBoxButtons.YesNo)

If mystr = "1" Then

'delete the records

else

'no action

end if

But I get the following error:
It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application.

How can I fix this?

Thanks in advance

--
Jennyferd J. Barco
Programming Manager
Wireless Data Systems, Inc.
20423 State Road 7, F6 #6182
Boca Raton, FL 33498
(561) 488-5540 office
(561) 271-3925 mobile
(561) 451-9072 fax
(e-mail address removed)
www.wdsinc.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MsgBox 2
MSGBOX PROBLEM 3
MsgBox in ASP.NET? 1
msgbox 4
MSGBOX Example 2
MsgBox Error 1

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,006
Latest member
LauraSkx64

Latest Threads

Top