Show message after entering data

Posted on 16th Feb 2014 by admin

Hello Colleagues

I would like to display messages after entering the data example: "
data were successfully " or " Error send data" in advance
thanks. Dim Coneccion As SqlConnection
Dim Comando As SqlCommand

Coneccion = New
SqlConnection(ConfigurationManager.ConnectionStrings("id").ConnectionString)
Comando = New SqlCommand("insertpbs", Coneccion)
Comando.CommandType = CommandType.StoredProcedure

Comando.Parameters.AddWithValue("@nombre", txtnombre.Text)

Try

Comando.Connection.Open()
Comando.ExecuteNonQuery()

Catch ex As Exception
ex.Message.ToString()

Finally
Comando.Connection.Close()
Response.Redirect("default.aspx")
End Try

Other forums