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
LVL 5
nkoriginalAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BardobraveCommented:
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.
0
urir10Commented:
fileupload controls do not retain the file path value between postbacks due to security reasons, nothing you can do about it. Only option you can do is either use ajax and put the radio buttons and panel inside an update panel, or you can use javascript to show the panel when a radio button is selected.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.