0
如果有人插入新的客戶/類別等我想要某種形式的小玩意屏幕,說:「成功保存」。我知道有:OnClientClick="return confirm (text)"
但這不完全是我在找的地方。」成功保存!「提交後彈出ASP.NET
我的代碼:
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
非常感謝你!知道它不會很難 – DiederikEEn
不客氣。如果它適合您,請標記爲已回答。幫助其他訪客找到答案:) – Darren
是的,我會的,必須等待幾分鐘;) – DiederikEEn