Friday, December 31, 2010

FindControl in Listview onItemDatabound Event in asp.net


Literal ltrlCFTransaction = (Literal)e.Item.FindControl("ltrlCFTransaction");
Literal ltrlID = (Literal)e.Item.FindControl("ltrlID");
CheckBox chkStatus = (CheckBox)e.Item.FindControl("chkStatus");

ltrlCreatedOn.Text = Convert.ToDateTime(DataBinder.Eval(e.Item.DataItem, "CreatedOn").ToString()).ToString();
ltrlMerchantName.Text = DataBinder.Eval(e.Item.DataItem, "cf_Merchant.Name").ToString();

Search

Custom Search
Protected by Copyscape Plagiarism Software