How can I show Uploaded file Names in a Label

Nov 7, 2009 at 8:21 PM

Hi everyone,

I am successful in uploading files from my page, but I want to pass the complete address of the uploaded files on the next page, so storing the the complete address would be required, How can I put the file names of each file in a string.

for example if I upload a file named an_image.jpg to a folder as http://www.example.com/images folder the complete address would be http://www.example.com/images/an_image.jpg, how can I store this string in a String variable in vb code.

Further how can I prevent from overwriting the same named file if I upload a file whose name is already there in the destination folder.

Thank You very much.

Coordinator
Nov 11, 2009 at 10:15 AM

Fot that you should use clent side events http://flajaxian.com/flajaxian.com/FileUploader2.0Help.html#HowToUseClientSideEvents

Nov 11, 2009 at 11:32 AM

Thank You for Your reply, but that code can add names in div, I want to store those names in VB string variables, How can I do that?

Coordinator
Nov 11, 2009 at 6:09 PM

Now you want me to write your app for you. There are many ways to do that and you have to explore them depending on what you want. For example you can set a hidden field value and then post the form to another page. Or you can set hidden field with runat="server" and create a postback. Or even better you can create a client side ajax call. If all I am talking about sounds foreign to you, you probably need to go through some ajax related tutorials.

Nov 14, 2009 at 9:48 PM

Thanks for Your reply.