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.
Kod se nalazi u OnClick proceduri:
Code:
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
'Check if product group has been selected
If Me.cboGCode.SelectedValue = "" Then
MsgBox("Please select group for this product before saving.", MsgBoxStyle.Exclamation, "Select Product Group")
Exit Sub
End If
Me.CoreProduct_InsertUpdate()
Session("IsNew") = "TRUE"
CoreProduct_Clear()
End Sub
Private Sub cmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSave.Click
'Check if product group has been selected
If Me.cboGCode.SelectedValue = "" Then
MsgBox("Please select group for this product before saving.", MsgBoxStyle.Exclamation, "Select Product Group")
Exit Sub
End If
Me.CoreProduct_InsertUpdate()
Session("IsNew") = "TRUE"
CoreProduct_Clear()
End Sub
Trazio sam resenje na google, ali nisam nasao nista konkretno. Posto se ASP.NET aplikacija izvrsava na serveru, onda i da ne daje gresku taj msgbox bi se pokazao na serveru. Koliko sam shvatio, treba da se koristi javascript ili vbscript za ovakve stvari. Gde da stavim vbscript code i kako da ga povezem sa aplikacijom?
Ako bi neko mogao da mi da neki primer bio bih jako zahvalan.
All beer is good. Some beer is better.

Kako pokazati message box na klijentu u ASP.NET aplikaciji?