Hi
How could I have a javascript pop message in the following code? I don't have any button to attach my code like this
Button1.Attributes.Add("onclick", "javascript:return confirm('My message')")
I would like to popup a message when I switch beetween to event. Any help appreicated.
Thanks
Protected Sub FormViewContacts_ItemInserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewInsertEventArgs) Handles FormViewContacts.ItemInserting
Dim dbConn As New OleDbConnection(ConfigurationManager.ConnectionStrings("BarConnectionString").ConnectionString)
dbConn.Open()
Dim dbSQL As String = "SELECT * FROM tblContacts"
Dim dbCmd As New OleDbCommand(dbSQL, dbConn)
Dim dbRead = dbCmd.ExecuteReader
While dbRead.Read()
Dim t As String
If IsDBNull(dbRead("ContactType")) Then
....... My message
e.Cancel = True
End If
End While
dbRead.Close()
dbConn.Close()
End Sub
How could I have a javascript pop message in the following code? I don't have any button to attach my code like this
Button1.Attributes.Add("onclick", "javascript:return confirm('My message')")
I would like to popup a message when I switch beetween to event. Any help appreicated.
Thanks
Protected Sub FormViewContacts_ItemInserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewInsertEventArgs) Handles FormViewContacts.ItemInserting
Dim dbConn As New OleDbConnection(ConfigurationManager.ConnectionStrings("BarConnectionString").ConnectionString)
dbConn.Open()
Dim dbSQL As String = "SELECT * FROM tblContacts"
Dim dbCmd As New OleDbCommand(dbSQL, dbConn)
Dim dbRead = dbCmd.ExecuteReader
While dbRead.Read()
Dim t As String
If IsDBNull(dbRead("ContactType")) Then
....... My message
e.Cancel = True
End If
End While
dbRead.Close()
dbConn.Close()
End Sub