Question : vb.net ListView prerender Event e.item.itemType

Hello folks I need your help again.
I've a listview, check my code, and I want to put e.item.itemType inside a PreRender, right now I've it inside databound but I having problem with a datapager, so I want to move it to a prerender event.

Thanks for any help

1:
2:
3:
4:
5:
6:
7:
8:
Protected Sub ListView1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListView1.PreRender
        If e.Item.ItemType = ListViewItemType.DataItem Then
            Dim lvDataItem As ListViewDataItem = CType(e.Item, ListViewDataItem)
            Dim item As String = lvDataItem.DataItem.ToString()

            Dim ImageButton As Image = CType(e.Item.FindControl("ImageButton1"), Image)
       end If
end sub

Answer : vb.net ListView prerender Event e.item.itemType

OnItemCreated is an event that occurs before the control is rendered. Does that work for you?
Random Solutions  
 
programming4us programming4us