Link to home
Start Free TrialLog in
Avatar of nkoriginal
nkoriginalFlag for Spain

asked on

FileUpload keep filename/path after isPostBack vb.net

Hello folks, I've a little problem  and I dont know how to fix it.
I've a form with a fileupload and a radiobuttonlist.
I need to select a file in my FileUpload then I need to select a radio button, then my radio button open a Panel with options. So I've an autoPostBack = true
But when I clicked the radio button I lost the filename in my fileupload.

How I can keep the path/filename in my fileupload after the postback ??

Thanks for any help
Avatar of Bardobrave
Bardobrave
Flag of Spain image

I'm not very sure of how vb.net manages form posting, but I supose that the autoPostBack sends info in your form to your server. This posting probably reloads your client form, you don't lose the radio button value because you're passing it to the server and managing it on form load, you should do the same with the value on the File upload.

File uploads are also a bit "special", maybe you can't send it's value through the same POST action, then you could try to keep a hidden text input with the string value of the file selected and use this input to send the info through the POST action.

Remember to manage the FileUpload information in your form when you load it.
ASKER CERTIFIED SOLUTION
Avatar of urir10
urir10

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial