Try
SqlDataSource1.InsertParameters("name_jong").DefaultValue = txtname.Text
SqlDataSource1.InsertParameters("email_jong").DefaultValue = txtemail.Text
SqlDataSource1.InsertParameters("add_jong").DefaultValue = txtadd.Text
SqlDataSource1.InsertParameters("tel_jong").DefaultValue = txttel.Text
SqlDataSource1.InsertParameters("datein_jong").DefaultValue = Calendar1.SelectedDate
SqlDataSource1.InsertParameters("number_room").DefaultValue = DropDownList1.SelectedValue
SqlDataSource1.Insert()
Session("sess_number_room") = DropDownList1.SelectedValue
Response.Redirect("Show_jong.aspx")
Dim sql1 As String = "SELECT * FROM Room WHERE number_room = @number_room"
Dim sql2 As String = "update Room set status=@ไม่ว่าง where number_room=@number_room"
SqlDataSource2.UpdateParameters("number_room").DefaultValue = ""
SqlDataSource2.UpdateParameters("status").DefaultValue = "ไม่ว่าง"
SqlDataSource2.Update()
Catch ex As Exception
Label1.Text = "ไม่สามารถบันทึกข้อมูลได้"
If (ex.Message.Contains("Violation of PRIMARY KEY")) Then
Label2.Text = "ห้องนี้ถูกใช้แล้วกรุณาเลือกหมายเลขห้องใหม่"
End If
End Try