Torna al Thread

protected void SelButton_Click(object sender, EventArgs e) { //recupero l'item che mi ha chiamato, risalendo nella gerarchia del button: ListViewItem lwi = ((ListViewDataItem)(((Button)sender).Parent)); //faccio il cast del campo che mi interessa (qui un esempio con una label) e lo inserisco in una stringa string a = ((Label)lwi.FindControl("MatricolaLabel")).Text; }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5