Two part question:
Does anyone have any example code that shows me how I can read a Session variable, that a web user control in an Asp.Net application has set, in an MVC Controller?
I've tried using HttpContext.Session([sessionvariablename]) but that's just not returning a value at all.
Second part is, that while I've been trawling the web to shed some light on this problem, I'm seeing a lot of people saying I shouldn't be using Session variables at all, yet no one is saying why? I understand it's bad practice to store a shed-load of data, but just a simple "CountryId=44" as a Session variable surely isn't that bad, is it?
Does anyone have any example code that shows me how I can read a Session variable, that a web user control in an Asp.Net application has set, in an MVC Controller?
I've tried using HttpContext.Session([sessionvariablename]) but that's just not returning a value at all.
Second part is, that while I've been trawling the web to shed some light on this problem, I'm seeing a lot of people saying I shouldn't be using Session variables at all, yet no one is saying why? I understand it's bad practice to store a shed-load of data, but just a simple "CountryId=44" as a Session variable surely isn't that bad, is it?
Last edited: