با سلام
کد زیر را برای ایجاد یک پنجره برای error گیری نوشتم. web application است. ایرادش چیه؟
error میده که:کد:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Answer As MsgBoxResult = MsgBox("Did you click?", MsgBoxStyle.YesNo, "Click?")
Select Case Answer
Case MsgBoxResult.Yes
MsgBox("you chose yes")
Case MsgBoxResult.No
MsgBox("you chose no")
Case Else
MsgBox("you chose something else unexpected")
End Select
' or you can do
If Answer = MsgBoxResult.No Then
MsgBox("you chose no")
Else
MsgBox("you chose yes") ' this executs on everything else though ;)
End If
کد: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.