Retreive Values From Dynamic Data Details View

I am working on someone's page which is a basic DynamicData page with DetailsView.  Since there are no templates on this DetailsView I am not sure how to retrieve values from it in my code behind.  I would normally use FindControl but since everything is autgenerated I am not sure how to go about this.  Please advise.
Who is Participating?
aibusinesssolutionsConnect With a Mentor Commented:
I would use the ItemCreated function of the DetailsView, here is a little sample to get you started.

Dim dv As DetailsView = CType(sender, DetailsView)
Dim userID As String = dv.DataItem("userID")

'loop through each field in the detailsview
For Each dr As DetailsViewRow In dv.Controls(0).Controls
    If dr.RowType = DataControlRowType.DataRow Then
           'do something to the rows here
    End If
HI There,

The details view has events that your are able to access.  Start here:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.