Hello all,
I have a proceedure that does a task. I want to pop up a message once the task is over...can't figure out how..
Private sub DoTask()
try
'do the work
'show the message - ShowMessageBox("All process completed.")
catch ex as exception
'Report error
'ShowMessageBox(ex.message)
end try
I tried calling the following sub. But it does not work.
Public Sub ShowMessageBox(ByVal strMessage As String, ByRef aspxpage As System.Web.UI.Page)
Dim strScript As String
strScript = "<script language=JavaScript>"
strScript += "alert(""" & strMessage & """); "
strScript += "</script>"
If (Not aspxpage.IsStartupScriptRegistered("ClientScript")) Then
aspxpage.RegisterStartupScript("ClientScript", strScript)
End If
End Sub
Any ideas.
Thanks,
MB
I have a proceedure that does a task. I want to pop up a message once the task is over...can't figure out how..
Private sub DoTask()
try
'do the work
'show the message - ShowMessageBox("All process completed.")
catch ex as exception
'Report error
'ShowMessageBox(ex.message)
end try
I tried calling the following sub. But it does not work.
Public Sub ShowMessageBox(ByVal strMessage As String, ByRef aspxpage As System.Web.UI.Page)
Dim strScript As String
strScript = "<script language=JavaScript>"
strScript += "alert(""" & strMessage & """); "
strScript += "</script>"
If (Not aspxpage.IsStartupScriptRegistered("ClientScript")) Then
aspxpage.RegisterStartupScript("ClientScript", strScript)
End If
End Sub
Any ideas.
Thanks,
MB