Solved

Retaining value of file input  during postback

Posted on 2004-04-14
8
1,073 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
  • 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
 
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now