Home > Blockchain >  how to Change Session.ToString to int
how to Change Session.ToString to int

Time:12-17

HttpContext.Session.SetString("module", "CallLogDetail");
HttpContext.Session.SetString("module", "CommentsPanel");
HttpContext.Session.SetString("module", "Update");
HttpContext.Session.SetString("Id", "0");
       
return View();

i have these code of line here Id is string how can i now change it to int.

CodePudding user response:

If you want to set Id to int instead of string in session, You can use .SetInt32(string key,int value) to achieve it.

Please refer to this Microsoft Docs.

  • Related