How to dynamically open file resource in browser using Response call in C# and ASP.NET? I have a file server that stores documentation. I have another server that runs IIS and ASP.NET application. I need to open a pdf document stored on the file server in a browser window. I supply folderPath string as "\\MyFileServer\documentFolder\" and filename string as "doc.pdf". I try to redirect to
Response.Redirect(folderPath + filename, true);
but redirection tries to append my provided location of the resource to current server path. I'm new to ASP.NET so please forgive me my ignorance. Oh, BTW, the site is accessed from android tablets so I need explicitly redirect client browser to a file resource, otherwise android will start downloading the file instead of opening it.