Pure ASP.NET Upload for Dreamweaver MX

Welcome to the tutorials of Pure ASP.NET Upload.

What will you learn:

  • How to create a file upload 
  • restrict certain files or sizes of files from being uploaded
  • upload files and insert them in a database
  • and much more...

Pure ASP.NET Upload - Save image size in 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.NET 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.NET Upload dialog

    Select the Pure ASP.NET Upload dialog by opening the Server Behaviors Panel. Select DMXzone - Pure ASP.NET Upload.

    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.NET 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.NET Upload extension, it will save the image size in the hidden fields. Now we need to apply the Insert Record server behavior (or Update Record if you are using an updating a 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. The most popular for its over high-quality Dreamweaver extensions and templates.

George is also the founder of Wappler.io - the most Advanced Web & App Builder

See All Postings From George Petrov >>

Comments

Set FTP permissions using ASP?

March 31, 2008 by student 101

 

How to set (FTP) permissions on certain folders using ASP?
I have no problems doing this in PHP.

How to do it in ASP?
(CHMOD 0777 then CHMOD 0755 after your'e done with the uplaod?)

Cheers

You must me logged in to write a comment.