I am working on a ticketing system for my company using Asp.net and c#. User can create a ticket and attach a few documents to it (mostly word and excel documents). I upload and save the documents in the web server in a dedicated location (i.e. C:\Attachments).
Now, when user opens a previously created ticket, I show the list of the attachments as link buttons in a Gridview. I want user to be able to open the attachment by clicking on the link button. I have achieved this in my local machine in development, but when I publish the web app into IIS Server, I don't know how to open the files saved inside the web server. How do I provide the path for the file? Should I first download the file in the client machine and then open it? Any help is much appreciated.
This is how I open the attachment in development (which is the OnClick event of the link button):
protected void OpenAttachment(object sender, EventArgs e)
{
string FileName;
FileName = @"C:\Attachments\Test.docx";
Process.Start(FileName);
}