Created
October 3, 2016 09:41
-
-
Save JohannesSundqvist/cd97f5272f21eaf87b43609dbbda2c82 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
Expected: | |
Image1.jpg | |
Image2.jpg | |
Actual: | |
Image1.jpg |
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 IActionResult ViewSpecificCustomer([Bind(Prefix = "id")]string code) { | |
// Directory currently contains 2 images that both gets selected (seen through debugging and placing breakpoints) | |
if (Directory.GetFiles(_environment.WebRootPath + @"\Images\CustomerImages\").Length != 0) | |
{ | |
foreach (var item in Directory.GetFiles(_environment.WebRootPath + @"\Images\CustomerImages\", code + "*.*")) | |
{ | |
ViewData["GetImages"] = item.Replace(_environment.WebRootPath, ""); | |
} | |
} | |
return View(); | |
} |
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
@ViewData["GetImages"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment