C# .NET - how can i access to a value from a data list in c#?
Asked By sara asa on 09-Nov-13 08:34 AM
hi guys...
i really need access a data list value to send somewhere...i search net just find 2 good line code that it didnt work for me..plz do me a favoure that i can solve it for always.
first line is :DataList DataList1 =(DataList)this.page.findcontrol("DataList1 " );
then i wrote:Label lbllabel=(label)Datalist1.items[0].findcontrol("IDLabel ");
then strind id=lbllabel.text;
i need get the value of IDlabel to send it somewhere this label is in my data list and it has eval("ID") from datasource. so i need to access to its value. but it show me error.
how can i solve it?its urgent. thank you.