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 - Upload and insert record

Upload and insert record form

In this tutorial we will explain how to upload files and other fields and save those to a database. The files will be saved on the server and their names and the other form fields will be saved in the database.


Previous TutorialTutorials IndexNext Tutorial

How to do it

To make file upload and insert a record, you need to:

  1. Make your form

    You can start with any page where you have a form on it with one or more entry fields. You need to add a file upload field if you haven't got one yet. If you haven't done it yet, go through the Simple file upload tutorial. So your form will look like:

  2. Save the page in your site

    After you've completed your form, you should save the page in the site you are currently working on.

  3. Add Insert Record Server Behavior

    Choose the Insert Record Server Behavior from the Server behaviors palette.

    Select your database connection and table where you want to save the data in.

    Assign all the entry fields from the form to the corresponding fields in your database.

    Enter a redirect page at After Inserting, Go To this will be the follow up page.

    Click OK to insert the server behavior.

  4. Add the Pure ASP.NET Upload extension

    Select the Pure ASP.NET Upload dialog by choosing it from the Server Behaviors palette, DMXzone / Pure ASP.NET Upload.

    Choose upload folder, Images only but don't enter a redirect url in the Go To field. This is because you already have a redirect in the Insert Record server behavior.

    To read more about uploading images read Allowing only images upload tutorial.

    To read more about limiting the image size read Restricting image width and height tutorial

  5. Save and done
  6. Save your page and upload it to your server, and you are done! Go to your website and test it - you should be able to upload images together with other form fields and all fields should be saved as a new record in your database.

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.