Author: peterthegreat | Posted on: 8/18/2009 11:03:56 AM | Views : 285

I want to use the databound value  P and assign it to the statement code in the LinkButton event, but the value is not passed? remains default 0 value?
Protected Sub DetailsView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles DetailsView1.DataBound
  Dim P As Integer = DetailsView1.DataKey.Value 
 Protected Sub LinkButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton.Click
                      
        Response.Redirect("FILEUPLOADS/IMAGES.aspx?prod=" & P)
...

Go to the complete details ...