Solved

Retaining value of file input  during postback

Posted on 2004-04-14
8
1,076 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
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

763 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