Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
Dim comment As Label = DirectCast(e.Row.FindControl("comment"), Label)
Dim compost As Label = DirectCast(e.Row.FindControl("compost"), Label)
Dim Label7 As Label = DirectCast(e.Row.FindControl("Label7"), Label)
Dim ImgPic As Image = DirectCast(e.Row.FindControl("ImgPic"), Image)
If (Not IsNothing(comment)) Then
comment.Text = e.Row.DataItem("COMDETAIL")
End If
If (Not IsNothing(compost)) Then
compost.Text = e.Row.DataItem("COMDATE")
End If
If (Not IsNothing(Label7)) Then
Label7.Text = e.Row.DataItem("COMID")
End If
If (Not IsNothing(ImgPic)) Then
ImgPic.ImageUrl = (e.Row.DataItem("COMPIC")) แสดงรูป
End If
End Sub