locked
How to Pass session variable value from unit test class to controller class RRS feed

  • Question

  • How to declare and Pass session variable value from unit test class to controller class

    public ActionResult Index(Int16? busline)
            {
                if (busline == null)
                {
                    Session["BusLineNo"] = 2;
                }
                else
                    Session["BusLineNo"] = busline;

                Session["ddlGrpByVal"] = 1;
                ViewBag.Group = Session["ddlGrpByVal"];

                return View();
            }

    Wednesday, March 26, 2014 12:15 PM

Answers