Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 21st, 2006, 07:44 AM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default Upload file and data

Hi,

I need to make a form that can upload files and put send data to put in a database in one page.

I know that if you want to upload files you need to put this in your form tag "multipart/form-data"

And if you want to send data you don't need this attribute.

Is it possible to put both in one page.

thnx

edit
Using request.Querystring by butting the string in the action url is not a option for me because query string has a max of 255 char and my data is able to go higher than that.

Is it possible to use Ajax without iframes
__________________________________________________ ________
This is my junk I'm gona eat it
  #2 (permalink)  
Old March 21st, 2006, 06:39 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

;;;I need to make a form that can upload files and put send data to put in a database in one page
Yes you can upload files and send data at thr same time in the same form

;;;And if you want to send data you don't need this attribute
if you dont want to upload and just post or get data from place to place, no you dont need it

;;Is it possible to put both in one page
Yes

here is my form tag:
<FORM NAME="updateForm" METHOD="post" encType="multipart/form-data" ACTION="Docs\FileUploadDetails.asp" onSubmit="return validate();">

;;;request.Querystring 255 max
mmmmm Im not sure on this one. I wouldnt send that much data in a QS the request.form method is best an what I use. Im sure a QS can take more characters however not cetain.

Wind is your friend
Matt
  #3 (permalink)  
Old April 11th, 2006, 05:56 AM
Authorized User
 
Join Date: Jan 2006
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hii

Yes it is possible to upload and save to database in one page.
As mentioned by Matt, you can use the Form tag.

Also check for complete write permission on the folder where the file is been saved (only if the file which is to be uploaded is saved to some specific folder)
If the file uploaded is a .txt file. then using the fileObject you can read each string, get the values and insert in to the database.

Regards,
Soni


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter File Types in ASP.NET File Upload ramuis78 ASP.NET 2.0 Basics 2 May 31st, 2007 10:50 AM
upload file hansgregory Pro Java 0 April 27th, 2007 09:18 PM
File Upload temmyabudu Classic ASP Components 2 December 15th, 2005 02:40 PM
Whole Folder upload(Multi file Upload) ramasamy_rams XML 1 September 9th, 2005 12:43 PM
JSP file upload and delete file pandjie JSP Basics 0 January 29th, 2005 10:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.