Back to Top
The nuts and bolts for
Creative web development

Pure ASP Upload Tutorials

To give you more inside knowledge of the working of the Pure ASP Upload, here you can read all the available online tutorials!

Saving the image size in the database

Saving the image size in the database

In this tutorial we will explain how to save the image size in the database.

Previous TutorialTutorials IndexNext Tutorial

How to do it

To save the uploaded image size in the database, you need to:

  1. Start with insert or update record upload page

    Start with an insert or update record page where you have Pure ASP Upload on it. We have created those pages in the Upload and insert record form and Upload and update record form tutorials.

  2. Add two hidden fields to your form

    To save the image size in temporary fields first, you need two hidden fields. Insert those and name them imageWidth and imageHeight for example.

  3. Open the Pure ASP Upload dialog

    Select the Pure ASP Upload dialog by double clicking it on the Sever behaviors list.

    Make sure you've selected Images Only for your allowed extensions.

  4. Choose the save fields

    Go to the Advanced tab of the Pure ASP Upload options. There choose the hidden fields you just created in the Save the Image Properties in Hidden Form Fields section.

  5. Reapply the Update record

    After you apply the Pure ASP Upload extension, it will save the image size in the hidden fields. Now we need to reapply the Update Record server behavior (or Insert Record if you are using an insert page) to also save the hidden fields.

    You should assign the hidden fields to the fields in your database.

  6. Save and done
  7. Save your page then, upload it to your server, and you are done! Go to your website and test it - you should be able to upload images and their size will be saved in the database!

    NOTE: This method will work only if you upload a single image! It won't work if you try to upload multiple images at the same time - ie if you have multiple file upload fields in your form.

Previous TutorialTutorials IndexNext Tutorial

George Petrov

George PetrovGeorge Petrov is a renowned software writer and developer whose extensive skills brought numerous extensions, articles and knowledge to the DMXzone- the online community for professional Adobe Dreamweaver users. His expertise in countless languages and technologies gives inspiration and teach valuable lessons on his website – which is most popular for its over high-quality Dreamweaver extensions and templates.

See All Postings From George Petrov >>

Share this Article