Summary

In this chapter, I discussed how .NET enables us to very easily implement file uploading from the client to the server using the HttpPostedFile and HtmlInputFile classes. I demonstrated different ways you can abstract information about the uploaded file including filenames, types, and sizes using some of the HttpPostedFile classes' members along with members of the System.IO namespace. We dove headfirst into how to enable the uploading of images and how to save those images back to your database. I then showed one method you can use to display images stored in a database by using a web form to implement the image and then in turn using that as the Image controls ImageUrl or an <img> html elements SRC attribute.

Specifically I went over ...

Get Programming Data-Driven Web Applications with ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.