I have a static Sub in a class that will display a RadAlert based on the message that is passed to it.
Here is that code:
So when this alert is shown to a user and they click 'OK' to acknowledge the alert, there is a delay for the alert to close. What is causing this delay and how do I correct it?
Thanks!
Here is that code:
Public Shared Sub NonAjaxAlert(ByVal message As String, ByVal AlertTitle As String, Optional ByVal UserName As String = "") |
Try |
Dim scriptString As String = String.Empty |
Dim exPage As Page = HttpContext.Current.CurrentHandler |
scriptString = "(function(){var f = function(){radalert('" & message & "',null,null,'" & AlertTitle & "');Sys.Application.remove_load(f);};Sys.Application.add_load(f);})()" |
ScriptManager.RegisterStartupScript(exPage, exPage.GetType(), "radalert", scriptString, True) |
Catch ex As Exception |
'Generic Error routine to log errors |
End Try |
End Sub |
So when this alert is shown to a user and they click 'OK' to acknowledge the alert, there is a delay for the alert to close. What is causing this delay and how do I correct it?
Thanks!