by Pieter Brinkman
23. July 2008 22:57
Get dataItem onItemDataBound (don't forget to replace the bold parts with your objectname):
protected void MainPostListView_ItemDataBound(object sender, ListViewItemEventArgs e)
{
YourObject item = (YourObject)((ListViewDataItem)e.Item).DataItem;
}
Findcontrol within the itemtemplate:
HyperLink hplTitle = (HyperLink)e.Item.FindControl("hyperLink");