ASP.NET: How do I check to see if my ListViewItemEventArgs is a ListItem or not?

Sabhay

New Member
When working with Repeaters I'm able to check and see if my ItemType in my ItemDataBound is an actual item by using the following code...\[code\]If e.Item.ItemType = UI.WebControls.ListItemType.Item Or e.Item.ItemType = UI.WebControls.ListItemType.AlternatingItem Then ...\[/code\]How can I do this same thing with my ListView? I attempted the check the same way above but no luck. The If statement never gets executed.Thanks!EDIT\[code\] Private Sub ListView_ItemDataBound(sender As Object, e As System.Web.UI.WebControls.ListViewItemEventArgs) Handles ListView.ItemDataBound If e.Item.ItemType = UI.WebControls.ListItemType.Item Or e.Item.ItemType = UI.WebControls.ListItemType.AlternatingItem Then 'This section never executes... End If\[/code\]
 
Back
Top