Dim conts As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
Dim sqlStr As String
sqlStr = "insert into accinst(Select_Lab,Staff_ID,Staff_Name,Item_Code,Item_Name,Supplier,Stock_Available,Date ) Values ('" + selectlab.Text + "','" + staffid.Text + "','" + staffname.Text + "','" + itemcode.Text + "','" + itemname.Text + "','" + supplier.Text + "','" + stock.Text + "','" + CDate(Calendar.SelectedDate.ToString()) + "')"
'Response.Write(sqlStr)
Dim SQLConn As New SqlConnection()
Dim SQLCMD As New SqlCommand()
SQLConn.ConnectionString = conts
SQLConn.Open()
SQLCMD.Connection = SQLConn
SQLCMD.CommandText = sqlStr
SQLCMD.ExecuteNonQuery()
SQLConn.Close()
Response.Redirect("accinstform.aspx")
...
Go to the complete details ...