Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim StrConnection As String = (Class1.SQLcon_)
Dim cn As New SqlConnection(StrConnection)
cn.Open()
If Not cn.State = ConnectionState.Open Then cn.Open()
Dim CODE, NAME, REMARK, TYPE_ As String
TYPE_ = " "
CODE = TextBox1.Text
NAME = TextBox2.Text
REMARK = TextBox3.Text
Dim myCommand As SqlCommand = New SqlCommand("UPDATE_CAR", cn)
myCommand.CommandType = Data.CommandType.StoredProcedure
myCommand.Parameters.AddWithValue("@TYPE_", TYPE_)
myCommand.Parameters.AddWithValue("@ID_CAR", Request.QueryString("ID_CAR"))
myCommand.Parameters.AddWithValue("@CODE", CODE)
myCommand.Parameters.AddWithValue("@NAME", NAME)
myCommand.Parameters.AddWithValue("@REMARK", REMARK)
myCommand.ExecuteNonQuery()
Response.Redirect("2.aspx")
End Sub