Skip to content
Loading
How to save value in session in mvc razor page
  • am getting error sir, the name TempData does not existing in current context
    @{
    TempData["id"]=i.EmpID;
    }
  • Vinay Singh
    So you can do one thing save the value in TempDate
  • session is taking previous inserted value EmpID ,it is not taking clicked EmpID ,
    is this not possible to save inside view
  • Vinay Singh
    then i will suggest you to save value at controller end
  • thank you for responding sir, value saving in session sir but i want to save that clicked EmpID (<ahref="#@i.EmpID>...) in session