protected void btnSalvaChangeFoto_OnClick(object sender, EventArgs e) { //hfIdFoto.Value = foto.idFoto.ToString(); //hfModifica.Value = vedi.ToString(); try { var cn = new GestioneCowBoy(ConnectionString); cn.SalvaModificheFoto(Convert.ToInt32(hfIdFoto.Value), hfModifica.Value == "2"); var lstFoto = cn.GetFoto(Convert.ToInt32(hfIdAnagrafica.Value)); PopolaFoto(lstFoto.OrderByDescending(f => f.Principale).ToList(), Convert.ToInt32(hfIdAnagrafica.Value)); } catch (Exception ex) { this.GetAlert(this.GetType(), ex.Message); } }