My Working with Data in ASP.NET 2.0 tutorials have been updated to include the four newest tutorials, which look at working with binary data (images, PDFs, MP3s, Word docs, and so on). The four tutorials extend the Categories table in the Northwind database by adding fields that allow users to associate an image and a PDF brochure with each category. The image binary data is stored directly within the Categories table, while the PDF brochure is stored on the web server's file system. Each tutorial builds upon the previous ones, and by the culmination of the fourth tutorial you'll have built screens for inserting, updating, deleting, and displaying binary data.
The four tutorials in this section are:
- Uploading Files [VB | C#] - illustrates how binary data can be stored on the web server file system or directly within the database, and pros and cons of both approaches. Examples show using the FileUpload control to upload a binary file from the visitor's computer to the web server and how to save it on the web server's file system or directly within the database.
- Displaying Binary Data in the Data Web Controls [VB | C#] - looks at how to display binary data within the GridView. For images, this may mean showing the image within each GridView row. For other file types, this likely means a link that, when clicked, takes the user to the binary data or prompts them to save it on their computer. Again, examples of binary files stored on the file system and within the database are provided.
- Including a File Upload Option When Adding a New Record [VB | C#] - learn how to augment the DetailsView to include a FileUpload control, allowing a visitor to add a new record to the database while uploading associated binary data.
- Updating and Deleting Existing Binary Data [VB | C#] - once binary data has been associated with a database record, we may need to update or delete the binary data or delete the record in its entirety.
Like the previous tutorials in the series, all tutorials are available in C# and VB, include the complete code download as a self-extracting ZIP, and are available in PDF format.
Happy Programming!