The event error is :
Protected Sub GVperson_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVperson.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim txtID As TextBox = CType(e.Row.FindControl("Pers_PersonId"), TextBox)
Dim txtphone As TextBox = CType(e.Row.FindControl("Pers_PhoneNumber"), TextBox)
Dim txtfname As TextBox = CType(e.Row.FindControl("Pers_FirstName"), TextBox)
Dim txtlname As TextBox = CType(e.Row.FindControl("Pers_LastName"), TextBox)
Dim x As New Person
If x.idPRO.ToString() = Nothing Then
txtID.Text = 0
End If
If x.phonePRO.Trim() = Nothing Then
txtphone.Text = 0 [b]-> error object refernce here
End If
If x.LNAMEPRO.Trim() = Nothing Then
txtlname.Text = 0 -> error object refernce here
End If
If x.FNAMEPRO.Trim() = Nothing Then
txtfname.Text = 0 -> error object refernce here
End If
Dim dt As New DataTable
dt = x.find()
GVperson.DataSource = dt
GVperson.DataBind()
End If
End Sub

New Topic/Question
Reply



MultiQuote






|