Link to home
Start Free TrialLog in
Avatar of CJSantora
CJSantora

asked on

Retaining value of file input during postback

I have a form which is quite extensive and to make the users experience a little more pleasurable, I have used some controls which cause a postback to the form. The problem is that the user is uploading a doc or excel file and when the form does the postback, the path in the html file input field is lost, how do I retain and postback that information to the form.

As always I appreciate any feedback that is posted.
CJSantora
Avatar of gregoryyoung
gregoryyoung
Flag of Canada image

it being that you are uploading the doc at that point ... save it on the server side ... if they change it .. it will upload again.
Avatar of mmarinov
mmarinov

actually you can not set value to the <input type=file ... control
but why do you upload the file on post back with out compleate filling the form ?

B..M
Avatar of CJSantora

ASKER

The form requires that they fill out several sections, the upload area is in the middle of the form and the cleint requires this to allow for a user friendly flow. So they user completes the top portion of the form and a select button to retreive account information which causes a postback, the information in the upload field is now lost.

CJSantora
it gets sent on the postback ... save it on the server side during the postback for use when they finally submit.

Although I would probably redesign the screen slightly to avoid the issue all together.
why don't you separate the data in different pages
top_portion/account information
then you won't "lose" anything?
B..M
I appreciate everyones comments, but the customer is calling ths shots and does not want the form redesigned or broken up. so I am forced to work with the form as is. I can save the information on the server, but when the postback occurs, the field is empty and this causes confusion for the customer, so I have been told to retina the information in the field somehow. I am very restricted on how this can be done, so I need to repopulate the filed with the information on postback. If anyone has any ideas, I would welcome them.


CJSantora
ASKER CERTIFIED SOLUTION
Avatar of gregoryyoung
gregoryyoung
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Although this is not the answer I was looking for, I guess I will have to deal with reality. I appreciate your help and am going to take your advice on this.

Thank you
CJSantora