如果有人插入新的客户/类别等,我想要某种显示:“成功保存”的小屏幕。我知道有:OnClientClick="return confirm (text)"
但这并不是我要找的地方。
我的代码:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim dbconn As SqlConnection
Dim dbcomm As SqlCommand
Dim strsql, Categorie, Klant, Website, Titel, Naslag As String
Categorie = DropDownCat.SelectedValue.ToString
Klant = DropDownList1.SelectedValue.ToString
Website = TextBoxWebsite.Text
Titel = TextBoxTitel.Text
Naslag = TextBoxslag.Text
dbconn = New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("sqlString"))
dbconn.Open()
strsql = "INSERT INTO tbl_Project (KlantID, Titel, Naslag, Website, CatID) VALUES ('" + Klant + "','" + Titel + "','" + Naslag + "','" + Website + "','" + Categorie + "')"
dbcomm = New SqlCommand(strsql, dbconn)
dbcomm.ExecuteNonQuery()
dbconn.Close()
End Sub