I am gettin the current row id using the proc belo:
-----
Sub GridView2_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
' Get the currently selected row using the SelectedRow property.
Dim row As GridViewRow = GridView2.SelectedRow
' Display the company name from the selected row.
' In this example, the third column (index 2) contains
' the year.
MessageLabel.Text = "You selected row ID = " & row.Cells(1).Text & "."
Dim currentrowID = row.Cells(1).Text
End Sub
------------
I am trying to insert it into this insert statement:
InsertCommand="INSERT INTO [CustomerImages] ([ImageID],[EquipmentID], [Title], [ImageData], MIMEType)
VALUES (@ImageId, (SELECT [EquipmentID] FROM Equipment WHERE ID = ' + row.Cells(1).ToInteger() + '), @Title, @ImageData, @MIMEType)" >
|