Hi,
Firstly, please change the mode of FormView to "edit". Then you can use FindControl to retrieve the control.
If it's hard to get it after changing to edit mode, you can use FindControlRecursive function to find specific control in the page.
You can try the below code to get the directory of the control.
Dim idcollection As String = ""
Public Function FindControlRecursive(ByVal ctrl As Control, ByVal controlID As String) As Control
If String.Compare(ctrl.ID, controlID, True) = 0 Then
' We found the control!
Return ctrl
Else
' Recurse through ctrl's Controls collections
For Each child As Control In ctrl.Controls
Dim lookFor As Control = FindControlRecursive(child, controlID)
If lookFor IsNot Nothing Then
idcollection = idcollection & child.ID & "-"
Return lookFor ' We found the control
End If
Next
' If we reach here, control was not found
Return Nothing
End If
End Function
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim tb As Control = FindControlRecursive(Page, "TextBox12")
If tb Is Nothing Then
Response.Write("control not found" & "<br/>")
Else
Response.Write("control found" & "<br/>")
Response.Write(idcollection)
End If
End Sub
The directory will be displayed so that you can use FindControl function to find it. Then you can also pass this control as Update parameter.