I have problem with detailview. My detail view like this:
ProductID: 1
ProductName: car
Price: 200
And when I click link button, it will appear "1"
This is the code behind:
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Dim detail As DetailsView = DetailsView1
Dim rows As DataControlFieldCollection = detail.Fields
Dim ProductID As DataControlField = rows.Item(1)
Label1.Text = ProductID.ToString
End Sub
But when I click link button, the text of label is "ProductID", not "1" like I want
Could you please help me? Thanks a lot!