Viewing file using asp.net
<p>In our application, we allow user to upload documents which can be PDF, Doc, XLS, TXT. Uploaded documents will be saved on web server. We need to display link for each document user uploaded and when user click on that link, it should open relevant document. it is expected to have required software to open relevant documents.</p>

<p>To upload document, we use saveAs method of FileUpload control and it works absolutely fine.
Now, how to view it?</p>

<p>I believe, i need to copy/download file to local user machine and need to open it using Process.Start.</p>

<p>For that i need to find user local temp directory. if i put path.GetTempPath(), it gives me web server directory and copy file there. </p>

<pre><code>File.Copy(
   sPath + dataReader["url"].ToString(),
   Path.GetTempPath() + dataReader["url"].ToString(), 
   true);
</code></pre>

<p>Please advise.</p>
