I have a partialView which lists out filepaths and I need to be able to click on that path and open the containing folder. The app was working locally and process.start() worked just fine until we moved to a production server and now a solution is needed for it. The browsers security restrictions won't allow me to open the containing folder directly. Is there a way to accomplish this?
Current setup, pretty basic stuff
public ActionResult OpenFile(string path, int someId)
{
Process.Start("explorer.exe", Path.GetDirectoryName(path));
The view looks like this
@foreach (var file in Model.FileSet)
{
var path = @file.FilePath;
<tr>
<td><a href='@Url.Action("Action", "Controller", new{path = @path, someId = Model.Id})'> @file.FilePath </a></td>
<td>@file.FileType</td>
<td>@file.Created</td>
</tr>
}
</tbody>
Any help is appreciated.