Upload or Download File to/from database by eDataForm - DataForm.NET Sample

This example illustrates how to upload an image file to a image column in SQL Server, then display it on the web page.

Pick a Theme:

Employee IDPhoto

First Name
Last Name
Title
Title Of Courtesy
Birth Date 
Hire Date 
AddressCity
RegionPostal Code
CountryExtension
Home Phone
Notes
ReportsTo

  Design   Source  
  1. Open DataForm.NET Manager. In DataForm.NET List page, choose Employees_Template by clicking the link.
  2. Switch to DataForm tab. Current DataForm uses Photo field to upload/display files.
  3. Click Photo field to open up the DataForm Field Designer window.
  4. The Control Type attribute is set to File, so is Data Type attribute. The file is uploaded to database, so the Location is set to the current field, Photo; and the file name is saved to PhotoPath field.
  5. There are some additional optional attributes which may be also useful, such as Width, Max Length and Allowed File Extensions.
  • Click HERE to open up a READ ONLY DataForm.NET Manager.
  • Click HERE to try for yourself.