Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1089
  • Last Modified:

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
0
CJSantora
Asked:
CJSantora
  • 3
  • 3
  • 2
1 Solution
 
gregoryyoungCommented:
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.
0
 
mmarinovCommented:
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
0
 
CJSantoraAuthor Commented:
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
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
gregoryyoungCommented:
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.
0
 
mmarinovCommented:
why don't you separate the data in different pages
top_portion/account information
then you won't "lose" anything?
B..M
0
 
CJSantoraAuthor Commented:
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
0
 
gregoryyoungCommented:
you can not repopuate this field.

I will however offer another suggestion ...

you have the File input ... next to it you have a label saying whether or not a file is uploaded (and a upload button) the user can upload the file in process of editting the form ... the label the says "File Uploaded" perhaps if the user clicks upload again it shows the file input again allowing them to pick a different file.
0
 
CJSantoraAuthor Commented:
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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now