Author: tubbypascal | Posted on: 11/14/2007 5:24:14 AM | Views : 514

Protected Sub DetailsView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles DetailsView1.DataBound
      Dim strFile As String
      strFile = DetailsView1.FindControl("FileName").ToString
End Sub
The above Code gives me this error : System.NullReferenceException: Object reference not set to an instance of an object.
The Detailsview displays one record with four fields. All I'm trying to do is retrieve the value of one field and use it in a variable.....this should be easy(not).
I have the following code working for a Gridview, but it doesn't work for a details view.......
  If (e.Row.RowState = (DataControlRowState.Edit Or DataControlRowState.Alternate)) OrElse (e.Row.RowState = DataControlRowState.Edit) Then
           &nb ...

Go to the complete details ...