Dim btn As LinkButton = CType(sender, LinkButton)
Dim g As GridViewRow = CType(btn.NamingContainer, GridViewRow)
Dim rowindex As Int16 = g.RowIndex
Dim hid As HiddenField
hid = gvPatient.Rows(rowindex).Cells(0).FindControl("hidid")
Dim lnkbtn As LinkButton
lnkbtn = gvPatient.Rows(rowindex).Cells(3).FindControl("LinkButton1")
GetAllPatientList()
try using this...onclick event of linkbutton in a gridview..I had already used this code and working fine..Change it in C# and use.