Created
January 6, 2016 17:06
-
-
Save bjoerntx/002a477df5a5814155f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult GetView(string viewName) | |
{ | |
switch (viewName) | |
{ | |
case "Open": | |
var documents = new List<Document>(); | |
foreach (string file in Directory.GetFiles( | |
Server.MapPath("/App_Data/documents"))) | |
{ | |
Document doc = new Document(file); | |
documents.Add(doc); | |
} | |
return PartialView("Stageviews/Open", documents); | |
} | |
return PartialView("Stageviews/" + viewName); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment