Call javascript from vb.net code behind
If DataStore.Record.Exists(theRecord) Then Dim script As String = “alert(‘Record exists’)” If Not Page.ClientScript.IsStartUpScriptRegistered(Me.GetType(), “alertscript”) Then Page.ClientScript.RegisterStartUpScript(Me.GetType(), “alertscript”, script, True) End If End If you would do it like above, where you should replaceDataStore.Record.Exists(theRecord) with condition that checks database record exists