Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Convert Gridview e.Row.DataItem to c#

$
0
0

I need help converting the following code to C# for a GridView RowDataBound

code...
Private Sub gv_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gv.RowDataBound

If e.Row.RowType = DataControlRowType.DataRow Then
  If e.Row.DataItem("hasIt") = "Y" Then   <--- this line flags a error message....
        'code goes here...
  Else
       'code goes here...
  End if
End if
End Sub


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>