locked
How to change the following code in VB.net in order to use it in asp.net using VB RRS feed

  • Question

  • User803642803 posted

    Cry , I got the following errors:

    1. row is not member of GridView
    2. Me.Qty.Index in not member of GridView

      For Each rows As DataGridViewRow In Me.InvoiceDetailsDataGridView.row
          If Row.Cells(Me.Qty.Index).Value = "" Then Exit For
      
          strSQL = "INSERT INTO InvoiceDetails (InvoiceID, Qty, ProductName, Price) VALUES(" & identity & ", " & Row.Cells(Me.Qty.Index).Value & ",'" & Row.Cells(Me.ProductName.Index).Value & "'," & Row.Cells(Me.Price.Index).Value & ")"
      
          cmd = New SqlCommand(strSQL, conn)
          cmd.ExecuteNonQuery()
      Next Row
    Monday, September 19, 2016 10:54 AM

Answers

All replies