Solved

how to enableviewstate on an input type=file

Posted on 2004-03-23
1
380 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

18 Experts available now in Live!

Get 1:1 Help Now