Hi,
I'm modifying a web forms app, using c#. I'm struggling with a simple task of assign a value to the session var; then retrieve it for comparison 2 pages later. Note: I did the same thing many time in MVC, it always worked. MAybe I'm not getting the syntx
correct?
Here is the code in my codebehind of the 1st page, where I set a value for the session var.:
protected void Page_Load(object sender, EventArgs e)
{
Session["PlanSelected"] = "Starter";
.....
}
2 pages later, I want to retrieve this session var; here is the code in the code behind file of the 4th page:
if ((string)HttpContext.Current.Session["PlanSelected"] == "Starter")
&nb ...
Go to the complete details ...