ASP.NET, SQL Server, Technology

How to store files in a MS-SQL Server database using ASP.NET

In this post we will take a look at how to store data in a MS-SQL Server database using ASP.NET. We will start by creating the database table in which we will store the actual file data, and then create a new Web Form with a file upload control and an upload button which will save the uploaded file to the database. After that we need to create a generic HTTP Handler which will be responsible for flushing out the file to the client. The reason to why we will use a HTTP Handler for this is that we don’t need all the functionality that the System.Web.UI.Page provides, so having both performance and simplicity in mind a HTTP Handler is a better choice. Read More »

ASP.NET, Technology

Export data to MS Excel using ASP.NET

The simplest way to export data to Microsoft Excel using ASP.NET is to make a tab- and line break delimited string (CSV), which is written out to the client using a HTTP-Handler with the content type set to “application/vnd.ms-excel”. Read More »