How to retain value in htmlinput file control after every post bac

S

Sara

Hai,
i have htmlinput file control and few checkbox and dropdown server
controls on my page. first i select value for input file control, after taht
i select from Dropdown. so in dropdown post back, it clears the value of
htmlinput file.
how to solve this problem..
i have to used autopost back for me server control and at the same time i
want to retain the value of html input control. suggest me pls
 
P

Patrice

Not easy. For safety reasons the only way to define the value of an HTML
input type=file field is the user input.

The basic idea is to avoid refreshing the whole page. For example you could
use an hidden frame or XMLHTTP to post some data to the server and to get
back what is needed to update the *current* page. ASP.NET 2.0 will
officialize a technique for doing so...

You could also "reverse" the UI that is allow the user to select a file only
when the dropdown value is definitively known. It should be sufficient in
most cases except if the user sees he entered a wrong value after selecting
the file...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top