public ActionResult Index(int?div, int?progid) { Response.NoCache(); var m = new OrganizationModel(); if (div.HasValue) { m.DivisionId = div; if (progid.HasValue) { m.ProgramId = progid; } else { m.ProgramId = m.Division().ProgId; } m.TagProgramId = m.ProgramId; m.TagDiv = div; } else if (Session[STR_OrgSearch].IsNotNull()) { var os = Session[STR_OrgSearch] as OrgSearchInfo; m.Name = os.Name; m.ProgramId = os.Program; m.DivisionId = os.Division; m.ScheduleId = os.Sched; m.StatusId = os.Status; m.OnlineReg = os.OnlineReg; m.TypeId = os.Type; m.CampusId = os.Campus; } return(View(m)); }