Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Retaining value of file input  during postback

Posted on 2004-04-14
8
Medium Priority
?
1,081 Views
Last Modified: 2008-02-01
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
Comment
Question by:CJSantora
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10827381
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
 
LVL 28

Expert Comment

by:mmarinov
ID: 10827819
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
 

Author Comment

by:CJSantora
ID: 10828159
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
URL rewriting in AWS CloudFront

A quick how-to guide to implement with a Lambda function!

 
LVL 37

Expert Comment

by:gregoryyoung
ID: 10828182
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
 
LVL 28

Expert Comment

by:mmarinov
ID: 10828276
why don't you separate the data in different pages
top_portion/account information
then you won't "lose" anything?
B..M
0
 

Author Comment

by:CJSantora
ID: 10834555
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
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 1000 total points
ID: 10834608
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
 

Author Comment

by:CJSantora
ID: 10835320
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

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question