you should use this line of code in the gridview.Add the hyperlink in gridview and edit this code to make it functioning.
<asp:hyperlinkfield text="Name?"
datanavigateurlfields="Id"
datanavigateurlformatstring="~\Persondetails.aspx?id={0}" //passing the Id to new page
headertext="Name"
target="_blank" />
at the second page you should write the code like this to make sure display the selected nama display all detail in second page.
Dim nameID As String
nameID = Request.QueryString("id")
Dim nameqstring As Integer = Convert.ToInt32(nameID)
to display data from selected second page use this one
Using sqlComm As New MySqlCommand()
sqlComm.Connection = sqlConn
With sqlComm
.CommandText = "select * From table where NameId=@nameId"
.Parameters.AddWithValue("@nameId", nameID)
Try
Dim sqlReader As MySqlDataReader = sqlComm.ExecuteReader()
While sqlReader.Read()
Label1.Text = sqlReader("Name").ToString()
Label2.Text = sqlReader("Job").ToString()
Label3.Text = sqlReader("Salary").ToString()
Label4.Text = sqlReader("Workhours").ToString()
Label5.Text = sqlReader("Status").ToString()
End While End Using End Using
hope this can help you alot.