<script runat="server">
Dim objDT As System.Data.DataTable
Dim objDR As System.Data.DataRow
Private Sub Page_Load(s As Object, e As EventArgs)
objDT = Session("Cart")
dg.DataSource = objDT
dg.DataBind()
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim nwind As SqlConnection
nwind = New SqlConnection("connection string info.")
Dim custsInsCmd As SqlClient.SqlCommand
Dim custRow As DataRow
Dim sql As String
custsInsCmd = nwind.CreateCommand()
For Each custRow In objDT.Rows
sql = "INSERT INTO rma_items (qty, mfr, part, serial, problem, order_id) VALUES ('" & custRow("Quantity") & "', '" & custRow("Manufacturer") & "', '" & custRow("Part") & "', '" & custRow("Serial") & "', '" & custRow("Problem") & "', '" & custRow("Order") & "')"
custsInsCmd = New SqlCommand( sql, nwind )
custsInsCmd.CommandText = sql
nwind.Open()
custsInsCmd.ExecuteNonQuery()
nwind.Close()
Next
End Sub
</script>