[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

how to enableviewstate on an input type=file

Posted on 2004-03-23
1
Medium Priority
?
400 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
[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
1 Comment
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 1000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

656 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