请帮我解决。我还是初学者
Imports System.Data
Imports System.Data.SqlClient
Partial Class MBranches
Inherits System.Web.UI.Page
Dim connString As String = ConfigurationManager.ConnectionStrings("myConnectionString").ConnectionString
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnInsert.Click
If Page.IsValid Then
Dim conn As New SqlConnection(connString)
conn.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|APU.mdf;Integrated Security=true; User Instance=true"
conn.Open()
Dim SqlString As String = "INSERT INTO tblBranch (BranchName, BranchAddress, BranchContactNumber) VALUES ("& txtName.Text &","& txtAddress.Text &","& txtCNumber.Text")"
conn.Close()
End If
End Sub
End Class