Solved

Retaining value of file input  during postback

Posted on 2004-04-14
8
1,079 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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 250 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

626 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