I am working on dynamic menus. Using Session Variable by passing whole object. As can be seen from controller:
Session[\"PackageSbMenu2\"] = QueryHelper.Get_
You need to cast your Session object
@{ var menu = Session["PackageSbMenu2"] as List; if(menu != null) { foreach(var t in menu) { t.Name } } }