Public Function DisplayAJAXMessage(ByVal page As Control, ByVal msg As String) As String 'function alert
Dim myScript As String = [String].Format("alert('{0}');", msg)
ScriptManager.RegisterStartupScript(page, page.[GetType](), "MyScript", myScript, True)
Return msg
End Function