IF (E.Item.ItemType == ListItemType.editItem)
{
DataRowView DRV = (DATAROWVIEW) E.Item.DataItem;
String CurrentValue = DRV ["Cur_ID"]. TOSTRING ();
DropDownList DDL = (DropDownList) E.Item.FindControl ("DDL_CurInfo");
DataTable Table = Readcurinfo ();
DDL.DataSource = Table;
DDL.DATATEXTFIELD = "cur_chname";
DDL.DataValuefield = "CUR_ID";
DDL.DATABIND ();
DDL.Items.Insert (0, New ListItem ("Please select", ""));
Ddl.selectedIndex = ddl.Items.indexof (DDL.Items.FindByValue (CurrentValue);
}
IF (E.Item.ItemType == ListItemType.alternatingItem || E.Item.ItemType == ListItemType.Item)
{
HyperLink HPL = (HyperLink) E.Item.FindControl ("HPY_ATTCH");
DataRowView DRV = (DATAROWVIEW) E.Item.DataItem;
String FileAttch = DRV ["oonmana_appendfile"]. TOSTRING ();
HPL.NAVIGATEURL = FileAttch;
Hpl.text = fileAttch.substring (FileAttch.lastIndexof (@ "/") 1);
}