Wrox Programmer Forums
|
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
 
Old April 8th, 2005, 08:37 AM
Authorized User
 
Join Date: Feb 2005
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default ENCTYPE="multipart/form-data" Issue

Dear Readers ,

 I am really thankful by the great support by the members of this group like mat & om prakash.
 Now what I am doin is I am sending Images from one page to other by setting Form ENCTYPE="multipart/form-data" . Now problem Is that i also want to send some other data like value of textbox , radiobutton etc , But it is not coming .

Any Help in this context is greeted.

Thanx

Cheers :
K K Singh.
+91-9810481159

Why to be GOOD when U have the ability to be GREAT
__________________
Cheers :
K K Singh.
+91-9810481159

Why to be GOOD when U have the ability to be GREAT
 
Old April 8th, 2005, 01:51 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, kk,

I just read the manual about the aspupload. First you have to use the following format for <form> tag:
<FORM NAME="MyForm" METHOD="POST" ENCTYPE="multipart/form-data"
        ACTION="upload1.asp">
in the :Uploads1.asp page, before you retrive any data from form, you have to write the following two lines:
   Set Upload = Server.CreateObject("Persits.Upload.1")
   Count = Upload.Save("c:\upload")
After you call the Save function, all the data in the form are stored in two collections: Files and Form. so you use:
   For Each File in Upload.Files
   ......................
   Next
to retrieve the file.
Using:
       Upload.Form("textField")
to retrieve individual item data.
You can check the following website:
http://www.asp101.com/resources/aspupload.asp

Hope it'll give you some help!

Andraw


 
Old April 8th, 2005, 11:56 PM
Authorized User
 
Join Date: Feb 2005
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear Andrw

 Thanx for ur reply . basically i know how to upload images into the database without using any third party component . The issue is that when i navigate from fisrt page to other with form enctype=multipart/form-data only images are carried over the next page . i also want to carry the value of other fields like te xtboxes , radiobuttons . how can i do that ..


Cheers



Cheers :
K K Singh.
+91-9810481159

Why to be GOOD when U have the ability to be GREAT
 
Old April 9th, 2005, 09:03 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

;;;only images are carried over the next page
Do you mean the value used in the <input type="file" ...> tag?. Could be a missing quote around a form element property that comes after the area that is passing values. There should be no change in how, or what type of values come thru. I would strip the page down and test, add a bit and test, add a bit more and test, ...

I have experienced this - I simply did not close of a " from memory

Wind is your friend
Matt
 
Old January 18th, 2007, 06:26 AM
Registered User
 
Join Date: Jun 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to barkerl
Default

Hi there,

I am using ENCTYPE="multipart/form-data" to upload files from my machine and most of the time it works fine.

However i have a strange situation whereby every so often the receiving Asp page cannot pick up the posted values via the Upload.Form method (even standard text fields).

This is regardless to whether I upload files or not.

Has anyone else experienced these intermittent problems? As yet i cannot establish a pattern as to why this occurs.

Any comments would be appreciated.

Thanks,
Lee Barker.
 
Old January 22nd, 2007, 06:11 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi,
try to request using following
mode=Request.QueryString("mode")

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com
 
Old January 23rd, 2007, 02:40 PM
Registered User
 
Join Date: Jun 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to barkerl
Default

Many Thanks for your reply.

The cause of the problem turned out to be obscure. There was a Session.Timeout = 1 hidden somewhere in a login script. Once the timeout occurs then no values can be posted.

Regards,
Lee.


Regards,
Lee Barker
 
Old June 24th, 2007, 10:08 AM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have a similar problem. I have a form which has a field for file uploading, a textbox and a checkbox. The problem is that when I use enctype="multipart/form-data" , only the file field is submitted and the file is uploaded whereas the textbox/checkbox value is not processed. On the other hand, when I change the enctype in the <form> tag to enctype="application/x-www-form-urlencoded", only the checkbox/textbox values are submitted and displayed on the next page while the file is not processed and, as a result, is not uploaded. Is there a way BOTH types of fields' data can be processed. I've tried various things but didn't succeed. Please help.






Similar Threads
Thread Thread Starter Forum Replies Last Post
ENCType="Mutipart/form-data" katipnee Classic ASP Basics 1 May 17th, 2008 08:12 AM
EncType="multipart/form-data" vackir ASP.NET 1.0 and 1.1 Basics 1 August 12th, 2006 02:28 PM
Issue with refresh of data in form bradbritton VB Databases Basics 1 February 24th, 2006 12:32 AM
Reading Multipart form data dotnetprogrammer VS.NET 2002/2003 0 July 12th, 2005 05:31 AM





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