Solved

how to enableviewstate on an input type=file

Posted on 2004-03-23
1
387 Views
Last Modified: 2012-05-04
I have a form with a file input that allows users to browse local harddrive for images to upload.

On the same form I have an autopostback dropdownlist for categories, but when the event fires all the server controls maintain viewstate but the file inputs are cleared?

I tried adding runat=server enable viewstate = true
but that does not work.

I also set a hidden label with the file value, but I am unable to set the inputfile.value with the lable.text.

Does anyone have a solution. I really want the inputs to maintain their values, without having extra labels and extra work

Thanks
Matt
0
Comment
Question by:unomateo
1 Comment
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 250 total points
ID: 10665196
unomateo,
Normally what i'll do to solve this problems is create a separate upload page(pop-up), then you can keep the current uploaded file in temporarily directory. If everythings is finish to configure/set input, the uploaded file will be move to your desired location later(add some code to kill the temporarily files). That's how i solve this problems. Hope it helps.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Summernote and form validation 10 232
wordpress display sub menu only when click 12 76
Diminish Pop-up  in 3 seconds 7 70
Retreiving SOAP FAULT messages using classical ASP 14 31
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
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…

730 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