Question : asp.net ..for loop - limit to reading first row of DataRow in dtVolumeOrder.Rows()

      how would you alter this code to read only the first row?

      For Each dr As DataRow in dtVolumeOrder.Rows()
           dr As DataRow in dtVolumeOrder.Rows()
           Dim intEventID As Integer = CType(dr.item("intEventID"), Integer)
           'response.write("test: " + intEventID.ToString())

               FillUserTypeList(intEventID)  
         Next

Answer : asp.net ..for loop - limit to reading first row of DataRow in dtVolumeOrder.Rows()

     For Each dr As DataRow in dtVolumeOrder.Rows()
           dr As DataRow in dtVolumeOrder.Rows()
           Dim intEventID As Integer = CType(dr.item("intEventID"), Integer)
           'response.write("test: " + intEventID.ToString())

               FillUserTypeList(intEventID)  
            Exit For
      Next

HTH
Ashok
Random Solutions  
 
programming4us programming4us