?
Solved

how to enableviewstate on an input type=file

Posted on 2004-03-23
1
Medium Priority
?
394 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

765 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