ShowMessageBox – Showing a client-side message box at the next page load

' Show a client-side message box at the next page load' Example:'    ShowMessageBox(Me, "Order successfully submitted!")Sub ShowMessageBox(ByVal webPage As System.Web.UI.Page, ByVal message As String)    ' replace ' with ', otherwise the resulting javascript may raise errors    message = message.Replace("'", "'")    ' create the script and add it to the page's response    Dim script As String = ""    If (Not webPage.IsStartupScriptRegistered("StartupAlert")) Then        webPage.RegisterStartupScript("StartupAlert", script)    End IfEnd Sub

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: