Book and Host Online Services
Please Login or Register

Knowledgebase

How to use Dundas Upload?

The following code demonstrates how to populate the Upload control's collections, save uploaded files to disk and retrieve form data. Please note that for brevity we do not perform any error checking

 
We will assume that a form with an encoding type of "Multipart/Form-Data" is POSTING to the ASP page which contains the following code:
 
1 . <%
2 . Dim objUpload
3 . Set objUpload = Server.CreateObject("Dundas.Upload.2")
4 . objUpload.Save "c:temp"
5 . strName = objUpload.Form("txtName")
6 . strSize = objUpload.Files(0).Size
7 . Set objUpload = Nothing
8 . %>
 
Explanation According to Line
1 . Open ASP tag
2 . Declare a variable named objUpload
3 . Create instance of Upload control
4 . Save uploaded files to to disk specified by physical path
5 . Retrieve the value of a form element called txtName
6 . Retrieve the size of the first uploaded file
7 . R
elease resources
8 . Close ASP tag



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
error:Root Web Busy (Views: 224)

Powered by WHMCompleteSolution

Language:

Quick Navigation

Client Login

Email

Password

Remember Me

Search



Follow Us on Twitter