public ActionResult PartialIndex(string startBtn, string dir, string Period) { if (Period == "Slow") { ViewBag.Delay = 8000; } else { ViewBag.Delay = 3000; } ViewParameters viewParams = Session["ViewParams"] as ViewParameters; List <int> indexesSel = new List <int>(); for (int i = 0; i < viewParams.Words.Length; i++) { if (viewParams.Words[i] == '1') { indexesSel.Add(i); } } Phrase phrase = Verbs.GetRandomVerb(indexesSel).GetRandomPhrase(); if (dir == "EnRu") { return(PartialView("EnRuAudio", phrase)); } else if (dir == "RuEn") { return(PartialView("RuEnAudio", phrase)); } else { return(PartialView("EnAudio", phrase)); } }