Please Does Any One Know ????

A

Adam Knight

Hello,

I am currently using an evaluation version the (latest) sa file up
component.
I have noticed and am concerned with the fact that the file up form
collection, seems
to support only one reading of values. Once i have created an instance
of the file up component upload a file and destroy it i am unable to gain
access to
posted values again.

This makes it difficult in a more object oriented approach to programming. I
have a class
responsible for uploading a file, and a class responsible for inserting data
in a db.
Only the first class that is called to extract info from the file up form
collection is populated
with data..after that all is gone.

Why is this ?
Is their a way around it?
 
A

Adam Knight

Tnanx Tom,

I understand how to get the values using the form and formEx collections.
My problem is if i create two instances of the fileup component to access
different
form field values...the second instance doesn't seem to have any data...
it is all gone..
 
T

TomB

When you create the first instance, it grabs all of the values.
What you need to do is pull all of the data out of the first instance and
store them in variables then pass the values to your classes.
 
C

Chris Baldwin

Adam Knight said:
Tnanx Tom,

I understand how to get the values using the form and formEx collections.
My problem is if i create two instances of the fileup component to access
different
form field values...the second instance doesn't seem to have any data...
it is all gone..

Hi Adam,

There should only be one instantiation of FileUp per HTTP request.
The first and only the first instantiation will consume and parse the
request from the client, leaving nothing more for the second instance
to read. I advise you to rework your object design so that your two
classes use the same instance of FileUp. Perhaps you could pass the
instance of FileUp to your second object instead of having it create a
brand new instance. You could also quite easily transfer the contents
of the Form collection into a Scripting.Dictionary object.

Best,
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top