Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/04/2010, 03:45
Avatar de Atorort
Atorort
 
Fecha de Ingreso: abril-2010
Ubicación: Valencia
Mensajes: 127
Antigüedad: 14 años
Puntos: 0
Alert para ASP.net

Buenas, buscando por el foro me he encontrado este código:

Código ASP:
Ver original
  1. Public Sub Alert(ByVal msg As String, ByRef P As Page)
  2.         Dim strScript As String
  3.         strScript = "<script language=javascript> alert('" + msg + ".');</script>"
  4.         P.ClientScript.RegisterStartupScript(Me.GetType(), "Alert", strScript)
  5.     End Sub

Y luego llamarlo simplemente así:

Código ASP:
Ver original
  1. Alert("No puedes eliminar este registro, existen datos relacionados", Me)

Bien, no me sale ningun mensaje en pantalla...a que se puede deber?