Сессия перейти к нулю при смене страницы - PullRequest
0 голосов
/ 15 октября 2019
// => Create session
List<Carico> elenco_carichi = HttpContext.Current.Session["elenco_carichi_partita"] as List<Carico>;
if (elenco_carichi == null)
{
    elenco_carichi = new List<Carico>();
}

// => Put list in session
HttpContext.Current.Session["elenco_carichi_partita"] = elenco_carichi;

// => Here go to null
List<Carico> elenco_carichi = HttpContext.Current.Session["elenco_carichi_partita"] as List<Carico>;
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...