I'm currently researching different methods and techniques into uploading and downloading documents into a sql server 2008 database using ASP.Net and C# for a web application.
I have found this excel tutorial, and i was wondering if it would be similar to upload pdf and word documents in a similar way?
Thanks
This tutorial should work for any file, not just excel. The key is in this part:
What is basically happening here is that the file stream is being turned into a Byte array which is stored as a data blob in your database. This can be used for ANY file type. Just be sure to keep the filename (or at least extension) around just as in the example above so that you know what kind of file it is when you turn it back into a file on disk.
Considering the example in the link you shared, use the following validation:
Here are some more MS Office 2007 MIME types you may consider and on All MIME Types you may find a broader list.
The answer is simple: YES, it's similar.
EDIT
The link you found is a sample shows you how to store a file content into database, it can be changed to any other different file type: pdf,doc,jpg, whatever, as long as you record the mim e type so that when download end user get it correctly
This answer is more appropriate when you are using ASP.NET MVC 4 or 5 with code first.