Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, i'm already display images using the following code in my MVC application this is the code of my controller

C#
var recordEventUploadFile = new RecordEventUploadFile();
           var ext="";
           var filePath = "";
           int i=0;
           var fileDetails = _reportReviewActionMethods.GetUploadFilePath(fileId);
           recordEventUploadFile.FilePath = fileDetails.FilePath;
           recordEventUploadFile.FileExtension = fileDetails.FileExtension;
           filePath = recordEventUploadFile.FilePath;
           var fileExtension = recordEventUploadFile.FileExtension;
           string[] ExtensionWODot = fileExtension.Split('.');
           if (ExtensionWODot[1].ToLower()== "pdf")
               ext = "application/" + ExtensionWODot[1].ToLower();
           else
           {
               ViewBag.ImagePath = fileDetails;
               return File(filePath, "image/" + ExtensionWODot[1].ToLower());
           }
           return File(filePath, ext);


it sucessfully display image but now I want to load group of images in single window by calling this action method how can I load those group of images? please tell me
Posted
Updated 10-Jan-15 2:12am
v2

1 solution

The "Comment" button is not available right now because of a CP site problem, so I'll post this as a "solution," and re-locate it as comment when the "Comment" button returns.

The code you show is an excerpt from a method; without knowing what is done with what the method returns it is hard to give you feedback.

If you want the code you show to handle multiple files, then you have to, obviously, give it some way to have a list of files passed in, or available in a variable, or you have to have a directory path passed in, and then select the files that match your criteria from within that directory (and/or its sub-directories).

Why don't you start by implementing however it is the method will know what files ... or, how to find the files ... you want displayed ?
 
Share this answer
 
Comments
sankarisiva 12-Jan-15 1:28am    
Thankyou for you comment

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900