Author: connexions | Posted on: 7/7/2009 8:03:05 AM | Views : 347

Hi. Why doesn't this work? Error Message Returned: Object reference not set to an instance of an object. Error is initiated at the bolded line of code in the Sub below. If it matters, FYI, GridView1 is nested in a FormView. Thanks.

-----------------
VB Sub:
        
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)
        
        If e.Row.RowType = DataControlRowType.DataRow Then
            Dim s As String = CType(e.Row.Cells(1).FindControl("PayRateAmount"), Label).Text

            Response.Write(s)
            '
&nbs ...

Go to the complete details ...